Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisroos/7461d83995d45f2339e6805c8d7c3be3 to your computer and use it in GitHub Desktop.
Save chrisroos/7461d83995d45f2339e6805c8d7c3be3 to your computer and use it in GitHub Desktop.

Reviewing Pull Requests

This was the habit I got into when working on Smart Answers. I'm aware that there have been some changes to the PR process since I last used it so it's possible I'd do things differently next time.

  1. Read the description and comments on the Pull Request

For example, my PR 269 in the Mocha project.

  1. Create a worktree for the remote branch

    $ git worktree add \
    ../mocha-refactor-class-method-and-any-instance-method \
    origin/refactor-class-method-and-any-instance-method
  2. Use gitk to review the commits

    $ gitk master..HEAD

    One advantage of avoiding the GitHub UI is that I get the commits in the order I expect. See GitHub's "Why are my commits in the wrong order?" help page for more info.

  3. Make notes about the commits in a text document

I found it more useful to record the summary of the commit rather than the SHA as the SHA will change if/when the branch is rewritten (e.g. if it's rebased).

This helps avoid mentioning something that's fixed in a later commit.

  1. Add comments to the PR

  2. Delete the git worktree

    $ cd ../mocha
    $ rm -rf ../mocha-refactor-class-method-and-any-instance-method
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment