Depending on the origin of a patch, the best way to apply it is slightly different.
Important: All patches require a corresponding issue filed in JIRA before it can be added to the source repository.
Important: When applying a patch (or pull-request) it is your responsibility to check that all requirements for contributions to the ASF are met. This includes especially that a patch has to be submitted to JIRA or one of the projects mailing lists.
Applying a patch attached to an issue in JIRA is quite straight foreward:
git apply MARMOTTA-123.patch
mvn apache-rat:check
),git add <file>
git add parent/pom.xml
git commit -m "MARMOTTA-123: applied patch by John Doe" -m "Submitted by: John Doe <john.doe.at.null.org>" --signoff --edit -S
Pull requests from via github should be included slightly different that "plain patches" to keep the original authorship of the changes.
Also pull requests on github require a corresponding inssue in JIRA with a patch attached. The patch can be downloaded directly from github by adding a .patch extension to the pull-request url. The patch has to be attached by the author.
Use the following steps to apply a pull-requests from github.
git remote add <github-user> https://github.com/<github-user>/marmotta.git
you can also restrict the remote to a specific branch:git remote add -t <remote-branch> <github-user> https://github.com/<github-user>/marmotta.git
git fetch <github-user>
git merge --no-commit --no-ff --log -m "MARMOTTA-123: Merged patch from <github-user> on github, closes #1234" -m "Obtained from: <github-user> <https://github.com/<github-user>/>" <github-user>/<remote-branch>
mvn apache-rat:check
),git add <file>
git add parent/pom.xml
git commit --signoff -S
The merge commit will be signed with your GPG-Key.