Last active
October 22, 2015 15:57
-
-
Save ZeroBugBounce/a50b5ce15adb7e7eb5b6 to your computer and use it in GitHub Desktop.
Various git log techniques
This file contains hidden or 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
| # This shows the git log in a color-coded one line format, excludes merge commits | |
| # and omits (grep -v) commits that mention 'chef'. It also places line numbers | |
| # in front of the commits that are listed, for squashing on HEAD~# purposes. | |
| gitlog() { | |
| (git log -${@-20} --pretty=format:'%C(yellow)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --no-merges | grep -v 'chef') | awk '{printf("%3d %s\n", NR, $0)}' | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment