top | item 42035497 (no title) henshao | 1 year 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? discuss order hn newest n4r9|1 year ago This 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-di... henshao|1 year ago Just 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
n4r9|1 year ago This 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-di... henshao|1 year ago Just 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
henshao|1 year ago Just 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
n4r9|1 year ago
[0] https://stackoverflow.com/questions/20106712/what-are-the-di...
henshao|1 year ago