Skip to content

Instantly share code, notes, and snippets.

@sap1ens
Last active November 14, 2017 23:16
Show Gist options
  • Save sap1ens/5637422 to your computer and use it in GitHub Desktop.
Save sap1ens/5637422 to your computer and use it in GitHub Desktop.
Update Git remote branches on local machine
  1. git remote update --prune
  2. git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment