Versions Compared

Key

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

...

Add the ASF git repository

If you have not done so already, add the ASF git repository. For example, to add as the "apache" remote repository:

 

Code Block
languagebash
$ git remote add apache https://git-wip-us.apache.org/repos/asf/reef.git

As a result, you can refer to the ASF git as "apache". An example setup, with a the GitHub mirror at upstream and a forked GitHub origin at {username}:

Code Block
languagebash
$ git remote -v
apache  https://git-wip-us.apache.org/repos/asf/reef.git (fetch)
apache  https://git-wip-us.apache.org/repos/asf/reef.git (push)
origin  https://github.com/{username}/reef.git (fetch)
origin  https://github.com/{username}/reef.git (push)
upstream  https://github.com/apache/reef.git (fetch)
upstream  https://github.com/apache/reef.git (push)

...

See this guide.

Merge changes

The next step is to merge all changes on the Pull Request as a single commit. There are two methods here: (A) pull the branch from the GitHub Pull Request and squash commits, or (B) get the .diff from GitHub and manually create a commit from this information. Each option has its pros and cons. With method A, git does some of the tedious work of preserving commit messages; but in some cases the squash may not apply cleanly, and the merger will have to carefully resolve conflicts. With method B, the .diff will apply cleanly (given that the branch is up-to-date, i.e. the GitHub GUI states that the "This pull request can be automatically merged by project collaborators"); but the merger will have to carefully copy over commit messages and edit author information.

...