Programifications

A mashup of technical quirks

Deleting Branches With Git

| Comments

Suppose we have a remote and local branch called foo. To delete it locally, just run:

1
git branch -D foo

You can verify that it has been deleted by listing your local branches. To do that, run:

1
git branch

To delete the remote branch run:

1
git push origin :foo

To list all branches (including remotes) run:

1
git branch -a

Comments