From 6c16e6b93c25efb8b139a077a84bdee04dadefdd Mon Sep 17 00:00:00 2001 From: Jarrett Drouillard Date: Fri, 13 Dec 2013 05:45:56 -0500 Subject: .gitconfig: Add `dm` alias `git dm` deletes local branches that have been merged with master. Closes #309. --- .gitconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to '.gitconfig') diff --git a/.gitconfig b/.gitconfig index f42caf1..249eead 100644 --- a/.gitconfig +++ b/.gitconfig @@ -31,6 +31,8 @@ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" # Find commits by commit message fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" + # Remove branches that have already been merged with master + dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" [apply] # Detect whitespace errors when applying a patch -- cgit v1.2.3