fredag den 18. september 2015

How to remove deleted branch names from Git autocomplete


This is actually just a kind of short-cut to this SO. But if you want to skip the reading then here is the one-liner which does the cleaning for you.


git fetch --prune --all


Also to prune all local branches which have already been merged:

git branch -d $(git branch --merged)
git remote prune origin
git branch -d $(git branch | sed '$d')

Ingen kommentarer:

Send en kommentar

Bemærk! Kun medlemmer af denne blog kan sende kommentarer.