From 3acd89108c15f8cabe5277fd2ac2b31d49083581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Barrag=C3=A1n?= Date: Wed, 23 Sep 2015 11:16:01 -0700 Subject: [PATCH] Add command to delete already merged branches --- README.md | 1 + zsh/aliases.zsh | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 6debb87..f9eb70a 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ It is recommended to use this file to set your user info. Alternately, you can s * `git unstage` / `guns` (remove from index) and `git uncommit` / `gunc` (revert to the time prior to the last commit - dangerous if already pushed) aliases * Some sensible default configs, such as improving merge messages, push only pushes the current branch, removing status hints, and using mnemonic prefixes in diff: (i)ndex, (w)ork tree, (c)ommit and (o)bject * Slightly improved colors for diff + * `gdmb` (g)it (d)elete (m)erged (b)ranches - Deletes all branches already merged on current branch ### RubyGems diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 6e5bc0a..63ddc18 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -128,6 +128,7 @@ alias gsmu='git submodule update' alias gt='git t' alias gbg='git bisect good' alias gbb='git bisect bad' +alias gdmb='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d' # Common shell functions alias less='less -r'