5.2 Creating a New Branch
Creating a new branch is a simple process. You still use the
git branch command, except this time you
give it the name of the new branch you want to create. You can
create a branch called new like this:
|
prompt> git branch new |
Git doesn’t give us any visible feedback that it created a new branch,
but we can check by running git branch
again without any parameters:
|
prompt> git branch |
|
|
* master |
|
|
new |
There’s our new branch called new. Notice that
the master branch has an asterisk by its name.
That’s to signify which branch is currently checked out.
The checked-out branch is the branch that your current working tree
reflects.
Of course, you want to be able to make ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access