Describes how to contribute code to the NetarchiveSuite git repository on Github.Code can be added to the NetarchiveSuite repository in two ways, either by pushing directly to the repository or by creating pull requests from a forked repository.
Committing directly to the NetarchiveSuite repository
This is used for core developers to add code in the NetarchiveSuite platform. The includes the DK NetarchiveSuite developers.
Workflow
Inspired by the Git-flow branch model we aim to develop all nontrivial code changes on feature branches with merges to master after a feature has been finished. The workflow here is:
Start the development on a feature by creating a new local feature branch. The standard is to name this according to the related JIRA issue.
git checkout -b NAS-XXXX master
Do the development with frequent commits of our code changes.
Optional: Push the changes to a corresponding remote branch:
git push origin NAS-XXXX
Optional: Merge master commits into the feature branch. This might be used to avoid having to merge a lots of changes from at the end of the feature development, and instead split these into smaller merges.
- Optional: Create a Jenkins job for the branch to verify the code base still builds as changes are pushed to Github.
- Prepare for merge to master by:
Check that build still works:
mvn clean install
- Performing a review of the changes made in the feature development.
Merge the latest changes on the master branch into the feature branch.
git checkout master git pull git checkout NAS-XXXX git merge master
Resolve any merge conflict.
Check that build still works.
- Merge to master
Merge to master:
git checkout master git merge NAS-XXX
Check that build still works.
Finally push the new feature code to Github master:
git push
All done
Contributing patches through pull requests
Used mainly by developers wishing to contribute code occasionally to the NetarchiveSuite repo.
Please see Github documentation on how do this.