-
-
Save stephenjtong/28f8b6b2e70d37bc059d2192fbca3925 to your computer and use it in GitHub Desktop.
git sync repo1 to repo2
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 dir in ams-backend ams-frontend ams-pop ams-crm-android qrscan | |
do | |
cd /root/git_sync/$dir | |
sudo git fetch --all | |
for a in $(git branch -a | grep remotes|grep gerrit | sed 's/remotes\/gerrit\///'); do git push -f origin gerrit/$a:refs/heads/$a; done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment