Skip to content
MichaelLeach edited this page Mar 28, 2012 · 28 revisions

At Cappuccino we use github’s Fork Queue to take code from outside parties, so contributing code is fairly simple.

Create your own fork of the repository

1. You’ll want to start by forking the main Cappuccino branch and creating your own copy. To do this, just click the “fork” button at our main page. You only need to do this once, and you can clone your forked repository to your local machine by doing the following:

$ git clone git@github.com:yourusername/cappuccino.git

Note that this URL is what is listed as “Your Clone URL” and not “Public Clone URL”.

2. This will clone your fork to your local machine, not the cappuccino master. In order to tell your local repository to sync with the cappuccino master, you’ll want to do the following:

$ cd cappuccino $ git remote add upstream git://github.com/cappuccino/cappuccino.git $ git fetch upstream

Making changes

3. If there isn’t already a ticket in the github bug tracker, create one. This will make the bug fixing/feature adding process more open, and guarantee that two people aren’t unwittingly working on the same thing. File a bug and comment that you are currently working on it. For more information on filing bugs, see Filing Bugs. This is important because every commit should be tied to a bug on github.

4. You can now proceed to make all the appropriate changes on your own git repository (Please read and follow the Cappuccino Coding Style Guidelines). After you have written and tested the new code, you need to commit it and push it to your GitHub fork. This will show you which files have changed:

$ git commit

You can do either of the following to commit the files you have changed:

$ git add File1.j File2.j File3.j $ git commit

or

$ git commit -a

Finally, you need to push your committed code back to GitHub:

$ git push

5. Once you feel the change is ready to be taken into the main branch, report it to the objectivej-dev mailing list. In the email, include a brief description of the bug and the fix, as well as links to the bug specific commits on github. At this point the community will have a chance to comment on the fix on the mailing list and on the github commit page.

6. Once the commit is accepted, we will merge it into the main branch. Before we can accept any code from you though, we first need you to sign a Contributor’s License Agreement and email it to us.

Keeping your fork in sync

Update: GitHub has now released a new Fast Forward option for keeping forks in sync. It’s as simple as just clicking the Fast Forward button on your fork, but here is more info . When using this, you can ignore step 2, 7, and 8.

7. You’ll want to keep your local repository in sync with the cappuccino master, so you always have the latest version:

$ git pull upstream master

8. Make sure there were no merge errors, then you’ll want to push these changes back to your GitHub fork:

$ git push

Clone this wiki locally