Last active
March 14, 2017 21:48
-
-
Save hoto/647c53623505cdac3e8fa47009a909c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT CLONE MIRROR FIRST FOR BACKUP | |
git clone --mirror git@... | |
# REMOVE ALL BRANCHES FROM REMOTE BUT LEAVE THOSE WHICH MRs ARE STILL OPEN | |
git branch --all | \ | |
/bin/grep -v -E "develop|release|master|production|mcc-123-somebranch" | \ | |
cut -d"/" -f3 | \ | |
xargs -n1 git push origin --delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment