I found this gist, showing how to check out a pull request locally from GitHub.
I\'m using bitbucket and I\'m looking for a similar function.
Can you help m
I followed this article Pull request Fetching.
It worked but I found out I just need add one line to the current repo, rather than create a folk repo and an upstream repo. Run this line
git config --add remote.origin.fetch '+refs/pull-requests/*/from:refs/remotes/origin/pr/*'
You can also add it manually to the file .git/config in your project.
Next run git pull you should see a list:
Then you can run git checkout origin/pr/666 to get the pull request changes.