DEV Community

Yaşar İÇLİ
Yaşar İÇLİ

Posted on

Checking out pull requests locally

For example, it sent you a send pull request from a fork or branch of your repository, you may want to merge it locally to test and verify changes on your local computer.

1 - Find the ID number of the inactive pull request. This is the sequence of digits right after the pull request's title.

Alt Text

2 - Open Terminal.

3 - Fetch the reference to the pull request based on its ID number, creating a new branch in the process.

git fetch origin pull/ID/head:BRANCHNAME
Enter fullscreen mode Exit fullscreen mode

4 - Switch to the new branch that's based on this pull request:

git checkout BRANCHNAME
Enter fullscreen mode Exit fullscreen mode

At this point, you can do anything you want with this branch. You can run some local tests, or merge other branches into it, including master. Make modifications as you see fit!

https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally#modifying-an-inactive-pull-request-locally

Top comments (0)