Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Git Branches and Merging!
You have completed Git Branches and Merging!
Preview
In this video, we'll show you how to review a pull request.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
When someone wants to review your
pull request, they just click on it.
0:01
They'll see the branch
that you want to merge.
0:05
They can go to their clone of the repo and
do a git fetch And
0:07
your branch the PR is based off of
will be downloaded to their computer.
0:13
Then, they can check out the branch,
git checkout add-letters, and
0:18
they can see what's changed
between the checked out branch and
0:23
another branch with git diff and the name
of the branch they want to compare to.
0:26
Most often, they'll want to see
the differences between this branch and
0:30
the master branch, so
they'll run git diff master.
0:33
This makes it easy to get a feel for
what's changed, and also to look for
0:37
mistakes in formatting inconsistencies.
0:40
If the project is code for a website or
application, the reviewer may also run
0:45
the project's unit tests to ensure they're
all passing, ruby test_decoder.rb.
0:49
Looks like everything's passing.
0:55
They should also compile and run the app
to ensure it's still working correctly.
0:56
When doing so, they may partly rely
on your notes in the pull request for
1:00
suggestions on what to test.
1:04
It's pretty common for
a reviewer to find one or
1:07
more minor issues with the pull request.
1:09
If they do,
they'll just go back to the PR's page and
1:12
leave a comment with what needs fixing.
1:14
In this case, I'm going to point out that
there are merge conflicts with master,
1:17
which the original pull request author
is going to wanna fix before merging
1:22
the pull requests.
1:26
To make changes to a pull request, you go
back to the git repo on your computer, and
1:31
check out the topic branch
that you based the PR on.
1:35
Then, make one or more commits
with the requested changes and
1:40
push them back up to the remote branch.
1:43
Pushing the new commits will automatically
update the pull request page,
1:45
and the reviewer should receive
a notification as well.
1:49
After the reviewer pulls and tests your
changes, they'll either leave another
1:52
comment on the pull request with
additional issues to fix, or
1:56
they'll approve the PR.
1:59
Once the PR is approved,
2:01
it's time to merge the PR branch
with the repo's master branch.
2:03
We'll wrap up the course by
doing that in the next video.
2:07
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up