Commit bc1f81ea1074f019666504e976c7a720f4f9b4f4
1 parent
ca7e079d
Exists in
master
Adding gitsync scripts.
Showing
2 changed files
with
62 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,28 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# https://help.github.com/articles/syncing-a-fork/ | |
| 4 | +# | |
| 5 | +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| 6 | +# | |
| 7 | +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | |
| 8 | +# | |
| 9 | +# Setup: | |
| 10 | +# | |
| 11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 12 | +# git fetch origin | |
| 13 | +# git push github --all | |
| 14 | +# | |
| 15 | +# | |
| 16 | + | |
| 17 | +git push | |
| 18 | + | |
| 19 | +git fetch origin | |
| 20 | +git checkout master | |
| 21 | +git merge origin/master | |
| 22 | + | |
| 23 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 24 | +do | |
| 25 | + echo "Updating ${repo} ..." | |
| 26 | + git push ${repo} | |
| 27 | +done | |
| 28 | + | ... | ... |
| ... | ... | @@ -0,0 +1,34 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# https://help.github.com/articles/syncing-a-fork/ | |
| 4 | +# | |
| 5 | +# https://help.github.com/articles/configuring-a-remote-for-a-fork/ | |
| 6 | +# | |
| 7 | +# https://www.opentechguides.com/how-to/article/git/177/git-sync-repos.html | |
| 8 | +# | |
| 9 | +# Setup: | |
| 10 | +# | |
| 11 | +# git remote add github https://github.com/PerryWerneck/lib3270.git | |
| 12 | +# | |
| 13 | +# | |
| 14 | + | |
| 15 | +if [ -z ${1} ]; then | |
| 16 | + echo "Inform target tag" | |
| 17 | + exit -1 | |
| 18 | +fi | |
| 19 | + | |
| 20 | +git push | |
| 21 | + | |
| 22 | +git fetch origin | |
| 23 | +git checkout master | |
| 24 | +git merge origin/master | |
| 25 | + | |
| 26 | +git tag -f ${1} | |
| 27 | +git push -f --tags | |
| 28 | + | |
| 29 | +for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
| 30 | +do | |
| 31 | + echo "Updating ${repo} ..." | |
| 32 | + git push ${repo} -f --tags | |
| 33 | +done | |
| 34 | + | ... | ... |