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.5 Deleting Branches

Branches can outlive their usefulness. The release was tagged; the experiment was proven successful or failed. When this happens, you should delete the branch to keep your repository’s branches from growing out of control.

After you merge your changes back into your current branch, such as the about2 branch you created, you can use the -d parameter on git branch to delete the old branch:

 
​prompt> git branch -d about2
 
​Deleted branch about2.​

This works only when the branch you’re trying to delete has been successfully merged into the current branch you are on. To demonstrate this, let’s switch back to the master branch. Remember, we haven’t merged any of our changes from the about branch yet. ...

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