Last active
December 6, 2017 11:41
-
-
Save brendandawes/9cb4222218c3086d99b9096389ce5fd9 to your computer and use it in GitHub Desktop.
Export branches. Replace <outputDirectory> with the path to where you want to export the branches.
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
for branch in $(git for-each-ref --format='%(refname:short)' refs/heads); | |
do git archive --format zip --output <outputDirectory>/${branch}.zip $branch; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment