diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-10-31 02:21:52 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-10-31 10:30:15 -0400 |
commit | bd8e845d459149525b1a12f50e61c868444a30df (patch) | |
tree | ed0d5143b073f4ac5e6aef26249cc3871a3771a4 | |
parent | f3527a3f2ae5938366b80f1052b729a930712a78 (diff) | |
download | conf-bd8e845d459149525b1a12f50e61c868444a30df.tar.gz conf-bd8e845d459149525b1a12f50e61c868444a30df.zip |
add a fzf alias for switching git branches
-rw-r--r-- | gitconfig | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -6,6 +6,8 @@ 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 + b = "!f() { git show-ref --heads --dereference | awk '{print $2}' | sed 's|refs/heads/||' | fzf --height 5 | xargs git co; }; f" + bd = "!f() { git show-ref --heads --dereference | awk '{print $2}' | sed 's|refs/heads/||' | fzf --height 5 | xargs 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))' cc = cherry-pick |