Skip to content

Manually merging pull requests

longsleep edited this page Nov 12, 2014 · 2 revisions

Spreed WebRTC development uses a Git branching model to track releases, features and development. Read http://nvie.com/posts/a-successful-git-branching-model/ for details.

Set up

 $ git remote add $ACCOUNT https://github.com/$account/spreed-webrtc.git
 $ git fetch $ACCOUNT
 $ git checkout --track $ACCOUNT/$BRANCH -b $BRANCH
 $ git rebase develop

Modify working directory

  • Reformat and fix the pull request branch as required.
  • Once the changes are finalized and commited to the local branch, you typically will want to squash multiple commits into a single commit. For example use git rebase --interactive --autosquash. Check if it makes sense to keep multiple commits and squash them accordingly as you see fit.

Merge into develop and push

Before merging to develop, make sure your local develop fork is up to date.

 $ git checkout develop
 $ git merge --no-ff --log -m "Merge pull request #$PR-NUMBER from $ACCOUNT/$BRANCH" $BRANCH
 $ git push spreed-webrtc develop:develop

You should add --no-ff as it adds a seperated commit for the merge. This avoids losing information about the historical existence of a feature branch and groups together all commits that together added the feature.

The above commands assume you have configured a spreed-webrtc remote like this:

 $ git show remote spreed-webrtc
 * remote spreed-webrtc
   Fetch URL: [email protected]:strukturag/spreed-webrtc.git
   Push  URL: [email protected]:strukturag/spreed-webrtc.git