Steevo Wiki

You are here: Home » dev » git

Dev:git

This is an old revision of the document!


Clean local branches

Add this function to bashrc:

function gitcleanlocalbranches() {
	git remote prune origin
	git branch -vv | grep ': gone]'|  grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D
}