Skip to content

Instantly share code, notes, and snippets.

@jesgundy
Last active February 22, 2023 16:24
Show Gist options
  • Save jesgundy/74701ce3561ede35395fa7aca1787a36 to your computer and use it in GitHub Desktop.
Save jesgundy/74701ce3561ede35395fa7aca1787a36 to your computer and use it in GitHub Desktop.
Git Helpers

Remove References to Remote branches that don't exist

git remote prune origin

Delete all local branches that don't have a remote

git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment