Submitting a Pull Request

The following is a guest post by Kevin Curtin and originally appeared on his blog. Kevin is currently a student a The Flatiron School. You can learn more about him here, or follow him on twitter here. Last week I talked about the importance of conributing to open source documentation. Here is a quick guide on how to actually go through […]

Reading Time 1 min

The following is a guest post by Kevin Curtin and originally appeared on his blog. Kevin is currently a student a The Flatiron School. You can learn more about him here, or follow him on twitter here.

Last week I talked about the importance of conributing to open source documentation. Here is a quick guide on how to actually go through the process of submitting a pull request and contributing to a project:

1. Fork the repository

Forking the repository will give you a copy of it on your github account

2. Clone your fork to your local machine

Change to the directory you want to store the project in. And run this command:

Blog post image: tumblr_mctlumeWNN1rtan47.png

This just pulls down a copy of the repo onto your machine. Running the clone command will automatically create a new directory in your current working directory with the name of the repo you cloned. In this case, it created a folder called “sqlite3-ruby” in my current directory.

3. Enter the directory and checkout a new branch

Enter the new directory by running:

Blog post image: tumblr_mctluzo5761rtan47.png

Branch names should describe the change you are going to make, for example:

Blog post image: tumblr_mctlve0hFa1rtan47.png

4. Make the changes you wanted to and push them to a remote branch

Once you have made changes, add them and commit them. Then run:

Blog post image: tumblr_mctlwezBB51rtan47.png

This will push your changes to a remote branch so that you can submit your pull request.

5. Submit the pull request!

Once you submit it, you will be asked to describe the change you made. Keep it short and to the point!

Disclaimer: The information in this blog is current as of November 6, 2012. Current policies, offerings, procedures, and programs may differ.

About Flatiron School

More articles by Flatiron School