Skip to content

Instantly share code, notes, and snippets.

@lukesteensen
Created November 15, 2012 22:21
Show Gist options
  • Save lukesteensen/4081807 to your computer and use it in GitHub Desktop.
Save lukesteensen/4081807 to your computer and use it in GitHub Desktop.
Using Github with a team

Using Github with a team

This assumes you have the following repos set up:

  • local

  • origin: your fork of the project on github

  • upstream: organization's original project on github

  • team members: other team members' forks on github, e.g. "max"

Making sure your local repo is up to date

Do this before you start a new topic branch, merge anything, etc.

git pull upstream master

Starting work on a new topic

Make sure local repo is up to date, then:

git checkout -b topic_name

When you think topic is ready to merge in

git push origin topic_name

then open pull request on github from that branch to organization's master

Merging pull requests

If the merge button on github doesn't work, you'll have to do it locally. Assuming Max opens pull request from branch "fix_js_error" and Zach wants to merge it in, Zach should do this:

git checkout master
git pull upstream master
git pull max fix_js_error
# resolve any conflicts
git push upstream master
# done now, but might want to:
git push origin master

Max's pull request will now be closed and his changes merged into master. Everyone will get these changes when they do

git pull upstream master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment