Skip to content
ghalliday edited this page Aug 4, 2011 · 10 revisions

If you use beyond compare then take a look at https://github.com/thenigan/git-diffall - a very useful varient of difftool.

Display the last commit.

log1=log -n 1  

Display a list of all changes since the master

logm=log master..

Display a tree of the commits.

tree=log --graph --oneline

And if you really want a graphviz dependency view of your commits....

graphviz = "!f1() { git log --pretty='format:  %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; }; f2() { git log --pretty='format:  \"%h\" [ label=\"%s\" ];' \"$@\"; }; echo 'digraph git {' ; f1; f2; echo '}'; "

To find out what changes from upstream\master are available to merge into your master

git fetch upstream
git log master..remotes/upstream/master

Quite a useful link for undertanding what the different formats for the references to commit versions (e.g., HEAD^2~5^^), see Specifying revisions