Skip to content

Instantly share code, notes, and snippets.

@ZeroBugBounce
Last active October 22, 2015 15:57
Show Gist options
  • Save ZeroBugBounce/a50b5ce15adb7e7eb5b6 to your computer and use it in GitHub Desktop.
Save ZeroBugBounce/a50b5ce15adb7e7eb5b6 to your computer and use it in GitHub Desktop.

Revisions

  1. ZeroBugBounce revised this gist Oct 22, 2015. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion my-git-log.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,6 @@
    $ git log -80 --pretty=format:'%C(yellow)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --no-merges | grep -v 'chef'
    # 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)}'
    }
  2. ZeroBugBounce created this gist Oct 16, 2015.
    1 change: 1 addition & 0 deletions my-git-log.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    $ git log -80 --pretty=format:'%C(yellow)%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --no-merges | grep -v 'chef'