Skip to Main Content
Pragmatic Guide to Git
book

Pragmatic Guide to Git

by Travis Swicegood
November 2010
Beginner content levelBeginner
160 pages
2h 50m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Git
13 Creating and Switching Branches

Git’s branches enable you to separate experimentation from production-ready code. Git’s convention is to treat the master branch as its main line of code. You can rename it to anything you want, but it’s a good idea to keep with the convention.

You can create a new branch using the git branch command and providing it at least one additional parameter: the name of the branch you want to create. This uses your current location in the repository as the place to create the branch from.

You can also create branches starting at points in the history of the repository. Provide git branch with the name of the new branch you want to create followed by the commit ID or branch or tag name to create a branch at ...

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

Pragmatic Version Control Using Git

Pragmatic Version Control Using Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

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

Git for Programmers

Jesse Liberty

Publisher Resources

ISBN: 9781680500028Errata