aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarrett Drouillard <jarrett@thestyl.us>2013-12-13 05:45:56 -0500
committerMathias Bynens <mathias@qiwi.be>2013-12-13 12:33:20 +0100
commit6c16e6b93c25efb8b139a077a84bdee04dadefdd (patch)
tree4454933bd8123949c4f57b1526532791a4ee09ca
parentd91d9e8fbd0f4dd21444ac6166d0b299aedb23cb (diff)
downloaddotfiles-6c16e6b93c25efb8b139a077a84bdee04dadefdd.tar.gz
dotfiles-6c16e6b93c25efb8b139a077a84bdee04dadefdd.tar.bz2
dotfiles-6c16e6b93c25efb8b139a077a84bdee04dadefdd.zip
.gitconfig: Add `dm` alias
`git dm` deletes local branches that have been merged with master. Closes #309.
-rw-r--r--.gitconfig2
1 files changed, 2 insertions, 0 deletions
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