Sending Pull Requests

This weekend I contributed to my first (of many more!) open source projects. I pair-programmed with Cameron Cundiff on Whiteboard, a tool from Pivotal Labs that aims to increase the effectiveness of office-wide standups and increase communication with the technical community. Cameron is a great human being, painter and advocate for web accessibility. I am big fan of his work. This experience taught me many lessons. I wanted to write a few blog posts about what I learned. In this first one, I’d like to share how one goes about contributing and properly submitting a pull request to an open source project.

This is how the process works from start to finish.

0 – Find a project you want to contribute. Check what issues are open. These are features or software bugs that need to be worked on.
Screen Shot 2014-03-24 at 4.48.59 PM
Cameron and I decided to work on issue #62, which required adding a link to the Whiteboard application landing page where the user can click on to show all standups locations.

1 – Fork the repo on GitHub
Go to the open source Github repo and fork it to your own account
Screen Shot 2014-03-24 at 4.15.52 PM

2 – Clone your fork to your local machine
Simply go to the directory you want to clone and run this command in your terminal:


git clone https_address_of_your_repo

Github makes it easy to find the https address on the repo page. Check the photo below for location.
Screen Shot 2014-03-24 at 4.23.45 PM

This creates a local folder in your directory. Cd into that folder and…

3 – Create a new branch

It is best practice to checkout a new branch when working on a feature or bug for an open source project. When you submit your pull request it is this branch that you send to the project’s owner.

Cameron and I did this by typing in our terminal


git checkout -b link-to-all-standups

After creating the branch, we coded and made the changes we wanted to contribute to the Whiteboard project.

4 – Submit the pull request

Add all the changes, commit, rebase if needed and push them to your remote repo.

In Github, select your branch and click on the green button.
Screen Shot 2014-03-24 at 5.01.57 PM

Make sure you have the right repo selected. If not hit edit.

Be descriptive in your pull request and inform in detail what you did or if there is any information that is useful for others contributors to know. Also don’t forget to add the issue number that you addressed.

This is how we wrote in our pull request submission. Use this as a reference if you need.

I would love to hear from your future open source contributions. Keep me posted.

Advertisements

One thought on “Sending Pull Requests

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s