How do I contribute to other's code in GitHub?

wizztjh picture wizztjh · Dec 8, 2010 · Viewed 43.9k times · Source

I would like to contribute to a certain project in GitHub. Should I fork it? Branch it? What is recommended and how to do it?

Answer

Yann Ramin picture Yann Ramin · Dec 8, 2010

Ideally you:

  1. Fork the project
  2. Make one or more well commented and clean commits to the repository. You can make a new branch here if you are modifying more than one part or feature.
  3. Perform a pull request in github's web interface.

if it is a new Feature request, don't start the coding first. Remember to post an issue to discuss the new feature.

If the feature is well discuss and there are some +1 or the project owner approved it, assign the issue to yourself, then do the steps above.

Some projects won't use the pull request system. Check with the author or mailing list on the best way to get your code back into the project.