Commit 1388ed247f91e91e36c1ebfe63bf90a489c2028a
1 parent
12b5429e
Exists in
master
and in
5 other branches
Updating gitsync scrupt.
Showing
1 changed file
with
11 additions
and
3 deletions
Show diff stats
gitsync.sh
... | ... | @@ -15,10 +15,18 @@ |
15 | 15 | git push |
16 | 16 | |
17 | 17 | git fetch origin |
18 | -git checkout master | |
19 | -git merge origin/master | |
18 | +git merge | |
20 | 19 | |
21 | -for repo in $(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
20 | +REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | |
21 | + | |
22 | +for repo in ${REPOS} | |
23 | +do | |
24 | + echo "Getting updates from ${repo} ..." | |
25 | + git fetch ${repo} | |
26 | + git merge | |
27 | +done | |
28 | + | |
29 | +for repo in ${REPOS} | |
22 | 30 | do |
23 | 31 | echo "Updating ${repo} ..." |
24 | 32 | git push ${repo} | ... | ... |