News for hackers. Stuff that matters.
Re:A better git log by philbo on Friday June 07, 2013 @05:53AM (#5838058)
Here are two variations that I find useful day-to-day.

1. Graph showing commits on all branches, decorated with branch and tag names, short commit hashes, committer name and commit comment:

    git log --graph --all --abbrev-commit --pretty=format:'%C(red)%d%x20%C(yellow)%h%x20%C(green)%an%x20%Creset%s'
2. List commits in HEAD that aren't in master:

    git log --abbrev-commit --pretty=format:'%C(yellow)%h%x20%C(green)%an%x20%Creset%s' master..HEAD
Re:A better git log by glenjamin on Friday June 07, 2013 @07:28AM (#5838289)
you can get a slightly more reliable list of commits that are in HEAD that aren't in master using --not:

    git log HEAD --not master
or the shorthand

    git log HEAD ^master
Re:A better git log by leephillips on Friday June 07, 2013 @08:31AM (#5838482)
What terminal does this work in? I just got raw escape codes.
Re:A better git log by philbo on Friday June 07, 2013 @09:03AM (#5838608)
Oh, I had no idea it wasn't portable, sorry. I'm using iTerm2 on OSX, but maybe worth trying them without the colouring:

    git log --graph --all --abbrev-commit --pretty=format:'%d%x20%h%x20%an%x20%s'
    git log --abbrev-commit --pretty=format:'%h%x20%an%x20%s' master..HEAD
Re:A better git log by leephillips on Friday June 07, 2013 @09:20AM (#5838684)
Those work, thanks. I'm on Linux using xfce4-terminal at the moment. There's probably a way to get the color codes to work, but I don't know it.
Re:A better git log by nuxi on Friday June 07, 2013 @10:28AM (#5839061)
Which PAGER are you using? If it's less, try setting PAGER='less -R', or LESS=-R to enable raw control character output.
Re:A better git log by leephillips on Friday June 07, 2013 @10:55AM (#5839234)
Bingo! Nothing to do with the terminal at all! Thanks!