Skip to content

Instantly share code, notes, and snippets.

@briandk
Last active April 17, 2018 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briandk/e6c09f90917893c400f2460e6a8ac1e1 to your computer and use it in GitHub Desktop.
Save briandk/e6c09f90917893c400f2460e6a8ac1e1 to your computer and use it in GitHub Desktop.
Useful git shortcuts
# via https://stackoverflow.com/questions/7726949/remove-local-branches-no-longer-on-remote#28464339
# prunes tracking branches not on the remote.
git remote prune origin
# lists branches that have been merged into the current branch.
git branch --merged
# deletes branches listed on standard input.
xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment