332
Comment:
|
← Revision 3 as of 2021-07-28 22:42:14 ⇥
387
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
git branch --merged >/tmp/merged-branches && \ | git checkout master && git branch --merged | grep -vi "master\|main\dev" >/tmp/merged-branches && \ |
Git/Cleanup
- Notes on cleaning a git repo, with a lot of old branches.
From: https://stackoverflow.com/questions/7726949/remove-tracking-branches-no-longer-on-remote
git remote prune origin git checkout master && git branch --merged | grep -vi "master\|main\dev" >/tmp/merged-branches && \ vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches