Delete local branches merged on origin
Did not realize that git
has added this feature in the past year (it has probably been around even longer) but in one command you can clean up your local branches based on what origin has with simply: git fetch -p
-p, --prune
After fetching, remove any remote-tracking branches which no longer exist on the remote.
Written by Justin Smestad
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Protip
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#