Training „git“
07.10.2010 - 08.10.2010, Essen
Training „Eclipse RCP“
28.03.2011 - 01.04.2011, Dortmund
30.06.2009

Bash helper function to browse the git history: glog

Add this to your ~/.profile to show the git history as nice ASCII graph by calling glog:

# shows the git history as ASCII graph
function glog() {
    git log --pretty=oneline --topo-order --graph --abbrev-commit $@
}

For example:

git history as nice ASCII graph

Lucas De Marchi, 31. Mai, 07:25 Uhr

Leave it as an git alias and you'll continue to have completion on your command. Add to your .git/configure (per project) or your $HOME/.gitconfig (with some other useful stuff):

[alias]
plog = log --pretty=oneline
pplog = log --pretty=oneline --abbrev-commit
glog == log --pretty=oneline --topo-order --graph --abbrev-commit

Ralf Ebert, 31. Mai, 18:22 Uhr

It probably was added in a recent version/might be the MacPorts package I'm using, but since recently I have an alias "git lg" by default for this:

git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"

I'm looking forward to your comments:

Schulungen

Tools

Ralf Ebert | Blog | Tools | Bash helper function to browse the git history: glog