diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-11-08 20:15:55 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-11-08 20:16:13 -0500 |
commit | ff25c7396383eaa6133dbc9b257c9beb9edc7410 (patch) | |
tree | 1f6afae754447a3dd18fb878dad05bed278ba1f9 /gitconfig | |
parent | a7a2701b623b067d42cb54bbfe266c8825f5e877 (diff) | |
download | conf-ff25c7396383eaa6133dbc9b257c9beb9edc7410.tar.gz conf-ff25c7396383eaa6133dbc9b257c9beb9edc7410.zip |
fix cancelling `git c`/`git bd`
Diffstat (limited to 'gitconfig')
-rw-r--r-- | gitconfig | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,11 +6,11 @@ aliases = !git config --get-regexp 'alias.*' | perl -nle'/^alias\\.([^ ]*) (.*)/ && printf \"%-15s = %s\\n\", $1, $2' alias = "!f() { local name=$1; shift; git config --global alias.$name \"$*\"; }; f" amend = !git add -p && git commit --amend - bd = "!f() { git branch -D \"$(git choose-branch)\"; }; f" + bd = "!f() { git choose-branch | head -n1 | xargs --no-run-if-empty git branch -D; }; f" blame-stats = !~/.bin/git/git-blame-stats br = for-each-ref --sort=committerdate refs/heads/ --format='%(align:30,left)%(HEAD) %(refname:short)%(end) %(color:green)(%(committerdate:relative))' choose-branch = "!f() { git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)' | fzf --height 40% --no-sort --preview='git show {} -q --format=medium'; }; f" - c = "!f() { git co \"$(git choose-branch)\"; }; f" + c = "!f() { git choose-branch | head -n1 | xargs --no-run-if-empty git co; }; f" cc = cherry-pick co = checkout diff-branch = "!f() { local branch=${1:-HEAD}; git diff $(git merge-base master $branch) $branch; }; f" |