This will give you la and lc , which shows you the oneline log, strictly ordered by 'author' or 'commit' date respectively. The "U" in the pretty specs refers to the "unix timestamp". The unix timestamp is included only for sorting and deletion later. Remains the ISO version.
alias.la=! log () { git log --pretty=lau $1 | sort -rn | cut -d " " -f 2- | less ; } ; log alias.lc=! log () { git log --pretty=lcu $1 | sort -rn | cut -d " " -f 2- | less ; } ; log pretty.lau=format:%at %C(dim yellow)%h %C(cyan)%ai%Cgreen%d %Creset%s pretty.lcu=format:%ct %C(dim yellow)%h %C(cyan)%ci%Cgreen%d %Creset%s
Using git la <commit specifiers> , so it could be git la or git la branch or git la C1..C2 . Note, however, that .. still operates in the usual way log . Sorting is post-processing only.
And here is another one:
> cat ~/bin/git-advance #!/bin/bash C="`git log --first-parent --format=%H ..$1 -- | tail -1`" if [ -z "$C" ]; then echo "Could not determine next commit" exit 1 fi git checkout "$C"
And then, of course, alias.advance=! git-advance alias.advance=! git-advance . Using git advance <future-commit> and will check the next commit from the current HEAD to the given <future-commit> . This will disconnect HEAD, but I find it convenient to transfer commits from git to another VCS manually. No guarantees, have not tried it on complex stories.
Here is something experimental for missing renames in merge conflicts:
https://gist.github.com/894374
source share