diff --git a/dotfiles/gitconfig b/dotfiles/gitconfig index 536dd35f..d848ce74 100644 --- a/dotfiles/gitconfig +++ b/dotfiles/gitconfig @@ -10,6 +10,7 @@ cpr = cherry-pick-range cam = commit -am clean-branches = "!r() { git branch --merged ${1-origin/master} | grep -v '*' | xargs -n1 git branch -d; }; r" + del-merged-branches = "!f() { git fetch $1 && git branch -r --merged $1/$2 | awk -F/ \"/$1/ && !/$2$/ {print \\$2}\" | xargs -I {} git push $1 --delete {}; }; f" clone = clone --recursive credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" # Credit an author on the latest commit co = checkout