Testing a Pull Request Locally

Aug 28, 2020 min read

Make a temporary directory (optional)

mkdir <temp folder> && cd <temp folder>

Initialize the folder with a .git repo (optional)

git init

Fetch the pull request, creating a new branch

git fetch <git remote url> pull/<pull request ID>/head:<new local branch name>

Checkout new branch

git checkout <new local branch name>

Now with the pull request code you can do local testing, see the changes in the context of the rest of the application code, run the application locally, etc.