DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.