Fork me on GitHub

Using Git

There are several ways to set up Git for committers and contributors. Contributors can safely set up Git in any way they choose, but committers should take extra care since they can push new commits to the upstream/main at Apache and various policies there make backing out mistakes problematic.

One time setup

Configuring the upstream remote

git remote add  upstream git@github.com:apache/opennlp.git

The last part of the upstream remote url must match the repository name.

Your repository should have two remotes, the upstream remote, and the default origin remote which is pointing to your forked version of the repository.

Merge a Pull Request via GitHub

Please do not commit directly to the main branch. All changes are done via Pull Requests, and a Pull Request needs to get two positive reviews and no change requests until it can be merged. The PR can be merged via the Github UI as described below or manually. Please also note that we do not use merge commits, the merge should be done using fast forward merging.

To merge a PR via Github follow these steps:

  • Wait for two positive reviews

  • Ensure the merge button is green (Travis CI build must have passed)

  • Select the option “Rebase and merge”, “Squash and merge” should only be used if the contributor is not providing a single squashed commit

  • Click on the merge button

  • Confirm the merge

Reject a Pull Request

Close the PR on GitHub and leave a comment why it was rejected.