From b6b103fe7065d2a0be121d700082dd29e4f92289 Mon Sep 17 00:00:00 2001 From: Vincent Klaiber Date: Wed, 15 Jul 2015 09:40:18 +0200 Subject: [PATCH] Remove branches that have already been merged with master --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5c5fbf4..d40c574 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,8 @@ git update-ref -d HEAD ```sh git diff --name-only --diff-filter=U ``` + +# Remove branches that have already been merged with master +```sh +git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d +```