Skip to content

Instantly share code, notes, and snippets.

@andytlr
Last active November 26, 2015 03:53
Show Gist options
  • Save andytlr/65c90409f354f5cafad7 to your computer and use it in GitHub Desktop.
Save andytlr/65c90409f354f5cafad7 to your computer and use it in GitHub Desktop.
# List merged branches
git branch --merged
# Delete all merged branches.
git branch --merged | grep -v "\*" | grep -v master | xargs -n 1 git branch -d
# Restage last commit. E.g. Whoops, just committed to master.
git reset --soft HEAD~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment