Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

First, you need to have remotes set up in your working copy for both the ASF maintained repo and the GitHub mirror. You can view your remotes with

Code Block
themeFadeToGrey
git remote -v

If you don't already have both remotes set up, you can add them with

...

The following command will grab the pull request into a new branch in your working copy. NUMBER represents the number of the pull request.

bash
Code Block
language
git fetch vcl-github pull/NUMBER/head:pr/NUMBER

If you will be working with a number of pull requests, you may want to issue the following configuration change to simplify things.

Code Block
languagebashdiff
git config --add remote.vcl-github.fetch '+refs/pull/*/head:refs/remotes/vcl-github/pr/*'


After that, you can run the following two commands, which are a little easier to remember.

bash
Code Block
language
git fetch vcl-github
git checkout pr/NUMBER

...

To view a diff of the changes between the branch you currently have checked out and the new one created from the pull request, use git diff:

language
Code Block
bash
git diff pr/NUMBER

Merge Changes

Use the following command to merge the pull request. NOTE: The "--no-ff" argument and the comments are important. The phrase "This closes #NUMBER" must be included in the comment to cause the pull request to be closed on GitHub. Also, if a JIRA issue is associated with the work, the issue number (VCL-###) needs to be included in the comment.

Code Block
languagebashdiff
git merge --no-ff -m "VCL-## - This closes #NUMBER" pr/NUMBER

For example, to handle PR#2 that addresses VCL-1101, the following would be used:

Code Block
languagebashdiff
git merge --no-ff -m "VCL-1101 - This closes #2" pr/2

...

Optionally, diff the changes against the ASF repo to double check before pushing to it. <branch> should be the same branch that was checked out in the Working Copy section above.

bash
Code Block
language
git diff vcl-asf/<branch>

...