Skip to content

Exercise 2 - Your 1st Pull Request #5

Open
@CristinaRuth

Description

Your 1st Pull Request

This exercise is to help you get familiar with the process on how to create a pull request.

If you are not familiar with Git and GitHub and are completely new, please see our #4 first before going through this exercise.

In this exercise, you'll create and merge a pull request against the repo you created in #4.

For terminologies, please refer to the presentation linked in our main README file.

Steps

  1. Let’s go back to Visual Studio’s Terminal window again. And let’s pull any changes to make sure we have the latest changes.
    git pull
  2. Let’s create a new branch.
    git checkout -b name_of_your_branch
  3. Push the branch to the remote server. Since we don’t have the branch created in our remote, we need to set this one as the upstream branch in remote.
    git push --set-upstream origin name_of_your_branch
  4. Make another change to the Readme.md file and push your changes. (See Exercise 1 - Your 1st Repo & Commit #4 for reference)
  5. Load your repository on github.com in your browser and you should see “2 branches” there now. Note the number of “commits” here. Click on the “2 branches” and go to your new branch and note the number of commits. The branch should have 1 more commit than the “master” branch.
  6. Let’s make a pull request. Click the “Compare & Pull Request “ button.
  7. In the next screen, write a comment as desired, and click the “Create Pull Request” button.
  8. Complete the pull request by clicking on the “Merge pull request” button + “confirm merge” button after that.
  9. Go back to your repository on github.com and you should see the number of commits would be 2 more than the previous number. This includes the “1” commit from your branch, and another commit for the pull request merge.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions