Git - Cleaning old branches with prune
Assuming the project has many branches
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/other-branch
when in remote a branch is removed, your project keep this branch in a history of remote branches
$ git push --delete origin other-branch
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/other-branch
to clean up the old branches of your listing, you can do
$ git remote prune origin
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
Written by Nícolas Lazarte Kaqui
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#