Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Teachable.

Create a pull request – GitHub

Details

If you want to merge your changes from one branch into another on GitHub, you should create a pull request.

Pull request alert on GitHub

If you’ve added commits to a topic branch recently, you will see a notice above your repo on GitHub with a Compare & pull request button. Alternatively, you can click the Pull requests tab and then click the New pull request button. This will take you to a new screen where you can add a title and an optional comment.

To finish creating the pull request, click the Create pull request button. This will take you to a new screen where you can add more comments, merge the pull request, or close it.

If you’re collaborating with other developers, the pull request is an opportunity for the other developers to look at the code you’re trying to merge and check to make sure it works. If more work needs to be done they can leave comments explaining what needs to be changed before the pull request is approved.

If you need to revisit your pull request you can find it under the Pull requests tab on your repository.

Exercises

This exercise requires that you have 2 branches. If you don’t have 2 branches, you can create a 2nd one and make a commit on it. Then you can create the pull request. Then try merging the branches.

References

Creating a pull request – GitHub Help

Back to: GitHub Reference