Created
April 16, 2018 10:07
-
-
Save canassa/a207c79a70937cbf647b5512e4990550 to your computer and use it in GitHub Desktop.
Git cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all branches that have been merged | |
git branch -r --merged | grep -v origin/master | sed 's/origin\///' | xargs git push origin --delete | |
# Get a list of git branches, ordered by most recent commit | |
git branch -r --sort=committerdate --format="%(refname:short) %(committerdate:short)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment