Fri, 20 Sep 2019 00:42:43 -0500
improve git-recent
.gitconfig | file | annotate | diff | comparison | revisions |
--- a/.gitconfig +++ b/.gitconfig @@ -24,7 +24,7 @@ new = "!git log --pretty=onelinecustom $1@{1}..$1@{0}" cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 echo git branch -d" glog = log --graph --pretty=onelinecustom - recent = !sh -c 'git for-each-ref --count=${1:-20} --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${@:2}' - + recent = "!f() { git for-each-ref --count=20 --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${1:-refs/heads} ${@:2}; }; f" [branch] autosetuprebase = always