Skip to Main Content
Pragmatic Version Control Using Git
book

Pragmatic Version Control Using Git

by Travis Swicegood
December 2008
Intermediate to advanced content levelIntermediate to advanced
184 pages
4h 47m
English
Pragmatic Bookshelf
Content preview from Pragmatic Version Control Using Git

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.
Start your free trial

You might also like

Git: Mastering Version Control

Git: Mastering Version Control

Ferdinando Santacroce, Aske Olsson, Rasmus Voss, Jakub Narębski
Pragmatic Guide to Git

Pragmatic Guide to Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss

Publisher Resources

ISBN: 9781680500189Errata Page