From 7a420b8cfdce8bc62b751a466d2c6be22d3c1810 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Tue, 8 Nov 2016 11:39:36 +0100 Subject: [PATCH] [git]Add alias for rebase, cleaning, and contains --- .gitconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitconfig b/.gitconfig index 6590337..ec63315 100644 --- a/.gitconfig +++ b/.gitconfig @@ -28,6 +28,13 @@ revertpart = reset -p HEAD^ diffword = diff --color-words=. save = stash save -u +#rebase last N commits + rb = "!f() { git rebase -i HEAD~$1; }; f" +#rebase since branching on branch N + rbi = !sh -c \"git rebase -i `git merge-base $1 HEAD`\" - + cleanbr = remote prune origin + cleanbrshow = remote prune origin --dry-run + contains = !sh -c 'git branch -a --contains $1' - [branch] #New branch track remote