summaryrefslogtreecommitdiffstats
path: root/gitconfig
diff options
context:
space:
mode:
authorJesse Luehrs <doy@stripe.com>2017-11-08 15:52:51 -0800
committerJesse Luehrs <doy@tozt.net>2017-11-08 15:52:58 -0800
commita7a2701b623b067d42cb54bbfe266c8825f5e877 (patch)
tree3f29fa8cc152dd65dee35d5421072c84f67f9d78 /gitconfig
parentb427f0c3be4544e5a294bdac53ab10fae775a0d5 (diff)
downloadconf-a7a2701b623b067d42cb54bbfe266c8825f5e877.tar.gz
conf-a7a2701b623b067d42cb54bbfe266c8825f5e877.zip
more simplifications
Diffstat (limited to 'gitconfig')
-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"