diff options
author | Aaron LI <aly@aaronly.me> | 2019-07-10 11:21:21 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-07-10 11:21:21 +0800 |
commit | d87201c7b95cd3b89665b4074c3c67f38e7eb376 (patch) | |
tree | 44c023c45fab030ee39fefb139c6c2297f62b9cc /_gitconfig | |
parent | 9bada0bf30622f7529d041d46a3cc5a48e2c56fb (diff) | |
download | dotfiles-d87201c7b95cd3b89665b4074c3c67f38e7eb376.tar.bz2 |
gitconfig: Add 'ref-next' and 'log-next' aliases
The 'ref-next' alias determines the *next* commit hash for the given
commit.
Credit:
* Referening the child of a commit
https://stackoverflow.com/a/21032988
* Git alias with positional parameters
https://stackoverflow.com/a/3326971
Diffstat (limited to '_gitconfig')
-rw-r--r-- | _gitconfig | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -38,6 +38,10 @@ # Show space and tabs wsErrorHighlight = all +[alias] + ref-next = !sh -c 'git log --ancestry-path --format=%H ${1:-HEAD}..master | tail -n 1' - + log-next = !git ref-next $1 | xargs git log + # Large file storage [filter "lfs"] clean = git-lfs clean -- %f |