Skip to content

Instantly share code, notes, and snippets.

@e-picas
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-picas/10463831 to your computer and use it in GitHub Desktop.
Save e-picas/10463831 to your computer and use it in GitHub Desktop.
GITk emulation in full git-log command line

GITk emulation in full GIT command line

One line GIT command to emulate a "gitk like" log:

git log --graph --full-history --all --color \
    --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%cN <%cE>%Creset'

The same without full history:

git log --graph --all --color \
    --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%cN <%cE>%Creset'

The same (again) with ISO dates:

git log --graph --full-history --all --color \
    --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cD) %C(bold blue)%cN <%cE>%Creset'

To define one of these as a GIT alias, use:

git config --global alias.lg "log ..."

These lines are taken from many websites over the web ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment