Search code examples
gitgithubpull-requestgit-checkoutgit-remote

git checkout a pull request branch on your own fork


We have this original repo called origin that all of us fork from and make changes.

I have a fork of this original repo called fork1 my friend has a fork of this original repo called fork2.

Today, he made changes on fork2 on branch feature and wanted to open a pull request to merge the branch feature to origin To approve his pull request, I wanted to test out feature on my fork1. How should I do it?


Solution

  • the pull request is made to origin which I don't have access to

    But you might have access to fork2, which means you could:

    • add fork2 as a remote to your own local repository
    • fetch from fork2
    • try and checkout or merge fork2/feature, to test if it is working.