Jason Merrill <ja...@redhat.com>: > Given git aliases: > > > stamp = show -s --format='%cI!%ce' > > scommit = "!f(){ d=${1%%!*}; a=${1##*!}; arg=\"--until=$d -1\"; if [ > > $a != $1 ]; then arg=\"$arg --committer=$a\"; fi; shift; git rev-list $arg > > ${1:+\"$@\"}; }; f" > > smaster = "!f(){ git scommit \"$1\" trunk --first-parent; }; f" > > shs = "!f(){ git show $(git smaster $1); }; f" > > slog = "!f(){ s=$1; shift; git log $(git smaster $s) $*; }; f" > > sco = "!f(){ git checkout $(git smaster $1); }; f" > > and an action stamp 2015-08-20T20:55:15Z!jason, then > > git sco 2015-08-20T20:55:15Z\!jason > > will check out the (most recent) commit with that stamp. It also works with > just the timestamp.
This is a corner of git of which I knew not. How does one set this sort of alias? I Google... Will git config --global alias.stamp = show -s --format='%cI!%ce and analogous command lines work? I think I understand what most of these are doing, but...you would be doing a service to the world if you wrote a little shellscript that set these up, with short explanatory comments reveraling what each is to be used for, like this: # sco - check out most recent commit with specified action stamp I'd add that to the reposurgeon distribution in a heartbeat. -- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>