Skip to main content

GitKit (2nd ed.): Learn git and GitHub in Context

Section 5.6 Updating Your Pull Request

At this point you have resolved the merge conflict and committed the changes to the feature branch in your local repository. What is left is to push that branch to your origin. When you do so, GitHub will automatically update your pull request to the upstream for that branch.

Exercises

1.

Give the command that will push your modified feature branch to your origin.
Hint.
Section 3.7 introduced the command for pushing a feature branch to your origin.

2.

(b)
    Which of the following pieces of information appear in the terminal output from your command?
  • The URL of your origin repository.
  • Correct.
  • The name of the feature branch that you pushed.
  • Correct.
  • A bunch of information about "objects".
  • Correct.
  • The name of the file that was changed.
  • Double check the output.
  • The URL of the upstream repository.
  • Are you sure it’s not your origin repository?
  • None of these.
  • Double check the command you used to push your feature branch.
Hint.
Look closely at the output from your command in the terminal.

3.

Now that you’ve resolved the merge conflict and pushed the result to GitHub, it should be possible for the maintainers to automatically merge your pull request. Let’s check!
(a)
Visit the upstream repo on GitHub, click on the "Pull requests" tab.
(b)
Find and click on your Round2 pull request.
(c)
Scroll down toward the bottom of the pull request.
(d)
    Which of the following messages do you see?
  • described in detail following the image
    GitHub message indicating that merging can be performed automatically.
  • Congratulations! You successfully resolved the merge conflict! Please continue to the next exercise.
  • described in detail following the image
    GitHub message indicating that there are merge conflicts that must be resolved.
  • Uh oh! Something didn’t work. Let’s try to fix it.
    1. Run the command git revert --hard HEAD~1
    2. Go back to Subsection 5.4.2, merge main into your feature branch and try again to resolve the conflict.
  • I don’t see either of the other messages.
  • If you see a message about GitHub checking if the merge can be performed automatically, wait a few moments for one of the other messages to appear.
You have attempted 1 of 3 activities on this page.