Skip to content

Commit b5ee876

Browse files
authored
Merge pull request #79 from guionardo/feature/git-remove-local-branches
feat(git) Remove all local branches that aren't in remote
2 parents d18bc83 + 02c8e83 commit b5ee876

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 on the remote repository
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)