Versions Compared

Key

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

...

  1. Fork repository
  2. Create branch
  3. Make changes in your local machine
  4. Merge the master branch into your branch
  5. Push commits into the your remote repo (forked)
  6. Prepare the commits for the pull request
  7. Send a pull request.
  8. Participate in the code review.

1. Fork repository

First, you need to fork the REEF repository. Go to the Github repository mirrored from ASF, and click "Fork" button. Then you will have your own repository. Clone this repository to your local machine:

...

Code Block
languagetext
$ git config user.name "My Name Here"
$ git config user.email myusername@apache.org

2. Create a branch to work on

Before making changes, you have to make sure the issue to resolve (e.g. fix a bug, implement a new feature, etc) is registered in the REEF JIRA. Create a branch to address the issue on your own. The name of the branch should reference the issue, e.g., REEF-{issue_number}. You can take a look how others name their branches.

...

Write the code and make commits as usual. Make sure all new files contain the ASF licensing header.

4. Merge the master branch into your branch

...

Code Block
languagebash
pick   7387a49 Comment for first commit
squash 3371411 Comment for second commit
squash 9bf956d Comment for third commit

Chapter 3 and Chapter 7 of the Git Book contains lots of information on what this means

In this process, git allows you to edit the commit message for the final, squashed commit. This commit message will serve as the description of the pull request and will in all likelihood appear in verbatim in the REEF history. In other words: Spend some time making it good (smile). A common template for this commit message is:

Code Block
[REEF-JIRA_ISSUE_NUMBER]: THE_TITLE_OF_THE_JIRA
 
This addressed the issue by 
  * INSERT_DESCRIPTION_OF_SOMETHING
  * INSERT_DESCRIPTION_OF_SOMETHING_ELSE
  * ...
 
JIRA: [REEF-JIRA_ISSUE_NUMBER](https://issues.apache.org/jira/browse/REEF-JIRA_ISSUE_NUMBER)

You can get a good idea how other people write their commit messages by inspecting the output of git log.

5. Push commits into the your remote repo (forked)

...

When you create a pull request, you choose the branches to compare and merge. Choose the base as apache:master and the head {your_alias}:{branch_name}. Fill out the description with what you have done. It is a good practice to start the description with "This addresses https://issues.apache.org/jira/browse/REEF-{issue_number}"The description will be the message of your one commit. Feel free to edit it if you aren't satisfied with your commit message.

Please update the JIRA issue with a link to the Pull Request. This triggers an email to the mailing list, which will hopefully result in a committer stepping up for a code review.

7. The code review

REEF follows a review-then-commit (RTC) model. We perform all our code reviews on GitHub: Community members will leave comments on your pull request and suggest changes. You can have a look at prior pull requests to get an idea of what to expect. During this process, you may want to change your code. You can do that by pushing additional commits to your branch. Don't worry about squashing the commits into one at this stage. This will be done by the committer once your code is merged into REEF.

When the code review concludesYou can push additional commits to address the feedback from the reviewer. When the status is good enough to be merged in the master branch, one of Committers will merge your work into the REEF codebase. Good job!

...

8. Merge the pull request (Committers only)

If you are committer, you can follow the steps in the Committer Guide to merge the pull request. Of course, you won't be merging your own pull requests. Nudge committers as needed to make sure everything gets merged correctly.

...