How to Review GitHub Pull Requests When Building a Node.js App
Posted on October 21, 2019 in Git, GitHub, Node.js by Matt Jennings
- In a GitHub repo checkout the Pull Request (PR) branch name, like cool-feature-branch.
- In your Terminal, to fetch all remote branches to your local machine and checkout the remote Pull Request branch name (like cool-feature-branch) do:
git fetch --all git checkout --track origin/cool-feature-branch
- In your Terminal, to checkout out the commits from the remote PR (cool-feature-branch) on your local machine do:
git log --oneline
- Then in your Terminal you’ll see something like:
a13b8b6 done with passport.js config file 7f3388e created passport login strategy 2175180 middle of adding NPM passport authenitcation file 5428a43 installed dotenv file [etc.]
- Make sure these commits on your local machine match the commits in GitHub! To exit the
git log --onelinemode in your Terminal do:
- In your Terminal, to run the Node.js app do:
npm run start
- Ensure that nothing is broken, test your app locally, and look at the code in the PR in GitHub!
- When ready, merge the PR in GitHub.