Skip to content

Commit

Permalink
Merge client master before creating a PR on the server avoiding confl…
Browse files Browse the repository at this point in the history
…icts

Fixes #5
  • Loading branch information
Heliosmaster committed May 17, 2019
1 parent 6cbf619 commit 5727796
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sync-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ cd local-repos/${CLIENT_REPO}
# clean up existing remotes
git remote | grep -v origin | xargs -r -n 1 git remote rm

# sync up local master branch
git fetch
git checkout master
git reset --hard origin/master

# checkout locally the user branch of the client repo
git remote add ${NEW_REMOTE} ${NEW_REPO_URL}
git fetch ${NEW_REMOTE}
git checkout ${NEW_REMOTE}/${BRANCH}

# merge master with the local branch
git merge master

# reset server repo to master
cd ../${SERVER_REPO}
git fetch
Expand Down

0 comments on commit 5727796

Please sign in to comment.