Skip to content
pandolph edited this page Feb 20, 2012 · 18 revisions

If you're a developer who wants to work on the GOODMaskedIconView source code and submit your changes to be merged into the master branch, here's how. Thanks to RestKit (and further up the stack Diaspora and ThinkUp) for their awesome developer guide, which was the basis for ours.

#Quickfire Dos and Don'ts

If you're familiar with git and GitHub, here's the short version of what you need to know. Once you fork and clone the GOODMaskedIconView code:

  • Don't develop on the master branch. Always create a development branch specific to the feature you're working on. For example, if you're working an inner glow effect, your development branch could be called inner-glow. If you decide to work on another feature mid-stream, create a new branch--don't work on both in one branch.

  • Do not merge the upstream master with your development branch; rebase your branch on top of the upstream master.

#Step-by-step

  1. Fork on GitHub (click Fork button).

  2. Clone to computer:

    git clone git@github.com:you/GOODMaskedIconView.git
  1. Don't forget to cd into your repo:

    cd GOODMaskedIconView/

  2. Set up remote upstream:

    git remote add upstream git://github.com/pandolph/GOODMaskedIconView.git

  3. Create a branch for new feature:

    git checkout -b new-feature

  4. Develop on new branch. [Time passes, the main RestKit repository accumulates new commits]

  5. Commit changes to issue branch:

    git add . ; git commit -m 'commit message'

  6. Fetch upstream:

    git fetch upstream

  7. Update local master:

    git checkout master; git pull upstream master

  8. Repeat steps 6–9 till dev is complete.

  9. Rebase issue branch:

    git checkout new-feature; git rebase master

  10. Push branch to GitHub:

    $ git push origin new-feature

  11. Issue pull request (Click "Pull Request" button).

Clone this wiki locally