Commit 2d20fb5ed7e03af33aa0243cc8e684fc20b4bb8d
1 parent
978d666a
Exists in
master
and in
5 other branches
Updating sync script.
Showing
1 changed file
with
7 additions
and
14 deletions
Show diff stats
gitsync.sh
| ... | ... | @@ -6,28 +6,21 @@ |
| 6 | 6 | # |
| 7 | 7 | # https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html |
| 8 | 8 | # |
| 9 | -# git remote add bitbucket https://bitbucket.org/pw3270/pw3270-application.git | |
| 10 | -# git remote add github https://github.com/PerryWerneck/pw3270.git | |
| 9 | +# Setup: | |
| 11 | 10 | # |
| 12 | - | |
| 13 | -# git remote add github https://github.com/PerryWerneck/pw3270.git | |
| 14 | -# git push github --all | |
| 15 | -# | |
| 16 | -# SUBTREES: | |
| 11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 17 | 12 | # |
| 18 | -# https://www.atlassian.com/blog/git/alternatives-to-git-submodule-git-subtree | |
| 19 | -# | |
| 20 | 13 | # |
| 21 | 14 | |
| 22 | -# git fetch lib3270 | |
| 23 | - | |
| 24 | 15 | git push |
| 25 | 16 | |
| 26 | 17 | git fetch origin |
| 27 | 18 | git checkout master |
| 28 | 19 | git merge origin/master |
| 29 | 20 | |
| 30 | -git push github | |
| 31 | -git push bitbucket | |
| 32 | - | |
| 21 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 22 | +do | |
| 23 | + echo "Updating ${repo} ..." | |
| 24 | + git push ${repo} | |
| 25 | +done | |
| 33 | 26 | ... | ... |