Skip to content

Instantly share code, notes, and snippets.

@eduard-sukharev
Created May 3, 2017 14:13
Show Gist options
  • Save eduard-sukharev/8efaaa013e18d625c75f2a3cbea600d4 to your computer and use it in GitHub Desktop.
Save eduard-sukharev/8efaaa013e18d625c75f2a3cbea600d4 to your computer and use it in GitHub Desktop.
Git list branch switching history (kind of)
[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))'
#!/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