The simplest way to create a pull-request and contribute code to open source projects on Github

Make a github account

Go to the project you want to contribute to

Press the “fork” button

Check out your forked copy of the project

git clone

Create a new branch and check it out (change “branch-name” to something descriptive of your work)

git checkout -b branch-name

Make your changes

Add each new or modified file to your commit :

git add path/to/file/file_name.c

Commit your change to your local branch

git commit -m "Add a comment about your changes here"

Sync your fork in case there have been any additions to the primary repository since you started your work

git remote add upstream
git fetch upstream
git checkout master
git merge upstream/master

Push your changes to your forked repository on github

git push --set-upstream origin branch-name

Go to the page on github for your forked repository and press the “Compare & Pull Request” button. Follow the directions to create the pull request.

(adapted from

Leave a comment

Your email address will not be published. Required fields are marked *