-
-
Save jeffery9/30f0d040fcbaa09a09a46dd6d6c3dad2 to your computer and use it in GitHub Desktop.
git-sync-all-branches
This file contains hidden or 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
# fetch all branches | |
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches | |
#!/bin/bash | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do | |
git branch --track ${branch##*/} $branch | |
done | |
git fetch --all | |
git pull --all | |
git push --all gitlab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment