Skip to content

Instantly share code, notes, and snippets.

@JeffreyMFarley
Last active April 20, 2023 12:37
Show Gist options
  • Save JeffreyMFarley/faddccf001b872e66122af69e3905b07 to your computer and use it in GitHub Desktop.
Save JeffreyMFarley/faddccf001b872e66122af69e3905b07 to your computer and use it in GitHub Desktop.

How should we clean up our branches? We have a lot

git branch -r --merged shows the remote branches that have been merged to main

git branch -r --no-merged shows the remote branches that have not been merged to main. These are either abandoned or squash-merged

Then git push origin --delete <branch>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment