Created
May 3, 2017 14:13
-
-
Save eduard-sukharev/8efaaa013e18d625c75f2a3cbea600d4 to your computer and use it in GitHub Desktop.
Git list branch switching history (kind of)
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
[alias] | |
history = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
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
#!/bin/sh | |
#might also be invoked as `git checkout -` | |
git checkout @{-1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment