From aec9d8b1a39cddb579df502e0c75fba1b7b0bf4e Mon Sep 17 00:00:00 2001 From: Ali Servet Donmez Date: Tue, 7 Jun 2016 09:32:41 +0200 Subject: [PATCH 1/2] Improve cleaning up branches merged into master --- tips.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tips.json b/tips.json index dfffb7a..727db1b 100644 --- a/tips.json +++ b/tips.json @@ -36,7 +36,7 @@ "tip": "git checkout -" }, { "title": "Remove branches that have already been merged with master", - "tip": "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" + "tip": "git branch --merged master | grep -v '^\\*' | xargs --no-run-if-empty -n 1 git branch -d" }, { "title": "List all branches and their upstreams, as well as last commit on branch", "tip": "git branch -vv" From 65dd8ac36f1dde3a542ce894a16611e9f6b0c67e Mon Sep 17 00:00:00 2001 From: Ali Servet Donmez Date: Wed, 8 Jun 2016 22:49:04 +0200 Subject: [PATCH 2/2] Update README and TOC ... by `npm run-script generate` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2af0e2d..117af3a 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ git checkout - ## Remove branches that have already been merged with master ```sh -git branch --merged | grep -v '\*' | xargs -n 1 git branch -d +git branch --merged master | grep -v '^\*' | xargs --no-run-if-empty -n 1 git branch -d ``` ## List all branches and their upstreams, as well as last commit on branch