Skip to content

Commit aba4313

Browse files
author
Guionardo Furlan
committed
Added "remove all local branches that aren't in remote"
1 parent 022ef9b commit aba4313

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Remove all local branches that aren't in remote
3+
command: |-
4+
"git branch --merged >/tmp/merged-branches && \
5+
vi /tmp/merged-branches && \
6+
xargs git branch -d </tmp/merged-branches"
7+
tags:
8+
- git
9+
description: "Remove all local branches that doesn't exists in remote repository."
10+
arguments: []
11+
source_url: "https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote"
12+
author: Mailo Světel
13+
author_url: "https://stackoverflow.com/users/133986/mailo-sv%c4%9btel"
14+
shells: []

0 commit comments

Comments
 (0)