Personal blog and hacks by Raymundo Cassani

7 steps for contributing a GitHub project


It's amazing that you're thinking into contributing to an open-source project.

Although the task seems intimidating, it can be broken into some simple steps. First of all, check if the project you want to contribute to has a CONTRIBUTING file. If it exists, this file presents the guidelines for repository contributors for the project.

Let's assume the you (YOUR-USERNAME) want to contribute to a the project COOL-PROJECT which repository is in the COOL-USERNAME GitHub account. In general the process to contribute to an open-source project can be divided into 7 simple steps. These steps are expanded with great detail in this wonderful post:

  1. Fork the repository from to your GitHub account and clone it to your computer.

    $ git clone
  2. Create a upstream remote (to this repository) and sync your local copy.

    $ git remote add upstream
    $ git remote -v

    At this point the origin remote refers to your forked repository in your account ( and upstream to the original repository ( To sync your local and origin repositories to the upstream repository, pull from upstream, and push to origin.

    $ git checkout master    
    $ git pull upstream master && git push origin master
  3. Create a branch in your local repository. This branch will contain your contribution.

    git checkout -b fixing-something
  4. Perform your contribution, write[good commit messages, and commit. If your contributions solves an open issue, close it with the proper commit message. NOTE: Make ONLY ONE contribution per branch.

  5. Push your local branch to your fork in GitHub (

    git push -u origin fixing-something
  6. On GitHub, create a new Pull Request from your fork.

  7. Provide feedback about the Pull Request, and if things are correct, your Pull Request will be merged upstream repository.


An example of a CONTRIBUTING file listing these steps in an open-source project cab be found here:


comments powered by Disqus