Skip to content

Instantly share code, notes, and snippets.

@drubin
drubin / Commands.md
Last active April 24, 2017 05:48
Useful git commands

Clean remote branches

git remote prune origin 

Clean branches already merged into master

git checkout master
for k in $(git branch -a --merged|grep -v "\->"|sed s/^..//);do echo -e $(git branch -d "$k");done