3 ms·
"git delete gone branches" is a one liner that you can google. first stack overflow result gives you the answer: git remote prune origin Why would you use
by henshao 2y ago
"git delete gone branches" is a one liner that you can google. first stack overflow result gives you the answer:
git remote prune origin
Why would you use this 50 line script to do the same?
- n4r9 2y agoThis only removes references to remote branches. See e.g. [0]. The command in OP operates on local branches. [0] https://stackoverflow.com/questions/20106712/what-are-the-differences-between-git-remote-prune-git-prune-git-fetch-prune https://stackoverflow.com/questions/20106712/what-are-the-di...
- henshao 2y agoJust for anyone else following along..you're right. Here it is. git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d