Git delete branch local and remote

Posted: 2013-09-09 in Git
Tags:

How To: Git Branch Delete

For this blog “origin” is my remote and the branch is hopethisworks (see picture for visual experience)

DeleteInGit

Deleting Branches In Git

To delete a local branch

git branch -d hopethisworks

To delete local branch that has contains commits not in origin branch:

git branch -D hopethisworks

To delete remote branch (in my case “origin”)

git push origin :hopethisworks
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s