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:
Shell12git fetch --allgit 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:
Shell1git log --oneline
- Then in your Terminal you’ll see something like:
Shell12345a13b8b6 done with passport.js config file7f3388e created passport login strategy2175180 middle of adding NPM passport authenitcation file5428a43 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:
Shell1npm 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.