Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

git: update pretty log format

Move the pretty log format into a `[pretty]` entry so that it can more
easily be used by other aliases. The new pretty log format places the
author name and date at the end of the line since the sha, commit
message, and branch tend to be the more important information. The
branch is now displayed as cyan, to match the color used for the branch
display in my bash prompt.

Since the `git graph` alias is identical to `git logp` apart from the
`--graph` flag, use the `logp` alias in the `graph` alias.
  • Loading branch information...
1 parent 6928bfb commit 1820f3e82dd11834d0c5c8647b548783a586e21d @necolas committed
Showing with 9 additions and 6 deletions.
  1. +9 −6 git/gitconfig
15 git/gitconfig
@@ -16,13 +16,10 @@
# Diff overview
diffst = diff --stat
- # tut:
- # ref:
- # Result: abc1234 5 hours ago | Commit message (HEAD, origin/master, master) [Nicolas Gallagher]
- # Custom graph log
- graph = log --pretty=format:'%C(yellow)%h%C(reset) %ar | %s%C(green)%d%C(reset) [%an]' --all --date-order --graph
+ # Custom graph log (note, uses `logp` alias)
+ graph = !git logp --graph
# Custom pretty log
- logp = log --pretty=format:'%C(yellow)%h%C(reset) %ar | %s%C(green)%d%C(reset) [%an]' --all --date-order
+ logp = log --pretty=nice --all --date-order
# Diffstat log
logst = log --stat
@@ -44,3 +41,9 @@
prompt = false
+ # tut:
+ # ref:
+ # Result: abc1234 Commit message (HEAD, origin/master, master) -- Nicolas Gallagher; 5 hours ago
+ nice = "%C(yellow)%h%C(reset) %C(white)%s%C(cyan)%d%C(reset) -- %an; %ar"

0 comments on commit 1820f3e

Please sign in to comment.
Something went wrong with that request. Please try again.