Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git prune local branches

# for pruning of local branches that have been deleted on remote
git remote prune origin

# for checking local branches and if they can be deleted
# because they have been merged into another branch already
git branch --merged >/tmp/merged-branches && 
  vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #prune #local #branches
ADD COMMENT
Topic
Name
3+7 =