Contributing to a Project with a Pull Request

It is important to remember that not all Pull Requests will be merged. Try to keep your pull requests valuable to the main project by providing documentation, a bug fix, or a new feature. Avoid “gotcha” pull requests that only fix a single bit of wording. Regardless, not all pull requests get merged (and I have had dozens that get closed without merging). Don’t feel bad: keep at it and with more context and experience you will be an open source machine in no time.

0:00

Let's actually contribute some code
back to the open source project.

0:04

We already created a fork of
the hello-treehouse Project earlier.

0:07

Let's clone your version of
the repository locally, make the fix and

0:12

create a pull request.

0:13

For this video we'll use
your local environment and

0:16

I'll walk you through each step.

0:19

First, let's make sure we have a copy
of the fork repository locally.

0:23

To find the fork repository
from the GitHub dashboard,

0:26

click on the context switch or on the top
left, and choose our organization's name.

0:31

Now you should see a list of
repositories on the right.

0:34

Let's click the hello-treehouse
repository.

0:37

We'll copy the URL from GitHub and
then go to our terminal.

0:42

We'll run git clone and paste the URL.

0:47

Then we'll move into the hello-treehouse
folder and I'll clear our console.

0:53

To make a change, the first thing
we'll want to do is create a branch.

0:57

By creating a branch, we're creating an
easy way for us to create a pull request.

1:01

If you remember in the git basics course
you can create a branch using git checkout

1:07

-b and
let's call this branch fix treehouse-bug.

1:12

Great now we have a new branch and git has
automatically moved us on to that branch.

1:16

Now let's make the simple fix.

1:19

If I open up the start.rb file using vim,
we can see, there's the error.