summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gitconfig6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitconfig b/gitconfig
index e0446e0..435fdf0 100644
--- a/gitconfig
+++ b/gitconfig
@@ -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 brp | fzf --height 40% --no-sort | xargs git branch -D; }; f"
+ bd = "!f() { git branch -D \"$(git choose-branch)\"; }; 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))'
- brp = for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)'
- c = "!f() { git brp | fzf --height 40% --no-sort | xargs git co; }; f"
+ 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"
cc = cherry-pick
co = checkout
diff-branch = "!f() { local branch=${1:-HEAD}; git diff $(git merge-base master $branch) $branch; }; f"