Commit 98370e687fe56ca9e9e7c73b70386c68b6596c3a
1 parent
81e5c9c4
Exists in
master
and in
4 other branches
Small adjustments in gitsync script.
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
gitsync.sh
@@ -17,13 +17,14 @@ git push | @@ -17,13 +17,14 @@ git push | ||
17 | git fetch origin | 17 | git fetch origin |
18 | git merge | 18 | git merge |
19 | 19 | ||
20 | +BRANCH=$(git symbolic-ref --short HEAD) | ||
20 | REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') | 21 | REPOS=$(git remote -v | grep -v origin | grep "(push)" | awk '{print $1}') |
21 | 22 | ||
22 | for repo in ${REPOS} | 23 | for repo in ${REPOS} |
23 | do | 24 | do |
24 | - echo "Getting updates from ${repo} ..." | ||
25 | - git fetch ${repo} | ||
26 | - git merge | 25 | + echo "Getting updates to branch ${BRANCH} from ${repo} ..." |
26 | + git fetch "${repo}" "${BRANCH}" | ||
27 | +# git merge 2>&1 > /dev/null | ||
27 | done | 28 | done |
28 | 29 | ||
29 | for repo in ${REPOS} | 30 | for repo in ${REPOS} |