Skip to content

Coweb Forking and Pull Requests

bouchon edited this page May 18, 2011 · 3 revisions

This page details Coweb-specific instructions on how you can start contributing to the coweb and cowebx repositories even if you don't have explicit access. It assumes that you have installed and configured Git on your machine.

One Time Setup

The steps in this section only need to be completed once at initial setup.

  1. Fork the "coweb" and "cowebx" repositories:

Alt text

  1. Now clone your fork(s) locally (replace USERNAME with your git username):
$ git clone [email protected]:USERNAME/coweb.git
$ git clone [email protected]:USERNAME/cowebx.git
  1. Keep track of the original opencoweb repo:
$ cd coweb
$ git remote add upstream git://github.com/opencoweb/coweb.git
$ cd ..
$ cd cowebx
$ git remote add upstream git://github.com/opencoweb/cowebx.git

In the future, when changes are made to the original opencoweb repo, you can pull them into your fork(s) by running the following from within both the coweb and cowebx repos:

$ git fetch upstream
$ git merge upstream/master
  1. Now follow the Dev Setup guide on your repos that you just forked, skipping the Source Control section at the top.

Per Feature/Bug Routine

The steps in this section should be completed whenever you wish to submit a feature update or bug to the coweb project. For more information on the topics covered here, see branching and pull requests.

  1. Make a branch per feature/bug and name it "intelligently" so we have an idea of what you're doing. Run from within your local coweb or cowebx repo:
$ git checkout -b NAME

You can check what branch you are in:

$ git branch

You can switch to a branch after it has been created:

$ git checkout NAME
  1. Stage and commit any changes:
$ git add *
$ git commit -m "A short meaningful description of changes"
  1. Push this branch to your fork on github, where NAME is your current branch name:
$ git push origin NAME
  1. Navigate to YOUR repository on Github, switch branches if necessary, and click 'Pull Request':

Alt text

  1. Enter a title (if not auto-filled) and description, review the request, and click 'Send Request':

Alt text