Skip to content

CropME contributing workflow

cyrillemidingoyi edited this page Nov 28, 2018 · 46 revisions

Contributors are invited to follow this process to interact with the project and allows an effective collaboration work. The following steps are common to the contribution to any CropME repository.

For more information on github project contribution, please see Rob Allen’s article

You have to fork any CropME repository to obtain its copy in your github account. After accessing to CropME Github project , select one repository and just click on “Fork” button in Github. You click on “clone and download” button on your github account and copy the SSH clone URL, and you clone it by this command:

git clone SSH_Clone_URL

You change SSH_Clone_URL by the copied link.

You need to synchronize the local copy with the original project to allow the update of local copy:

git remote add upstream SSH_Clone_URL

with SSH_Clone_URL the SSH Clone URL of the main repository

It is recommended to create a new branch to put each part of your work. Before creating it, be sure that you have all the upstream changes (main github project) from the origin master:

git checkout master (to branch on master)

git pull upstream master (to synchronize with the main project)

To create a new branch and access to it:

git checkout -b new_branch

Add a CropML DTD, a model unit, a tool, a library or any file/repository on a branch and write commit message ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You select the repository in which you want to contribute. For example, if you want to update CropML DTD, you choose CropML repository and add its update:

git add modelunit.dtd
Write a commit message::
git commit -m “commit message”
To update your branch of your fork repository::
git push origin name_branch

Sometimes this step can generate an error message. This is when there is a difference between the remote and the local repository. To address this, pull the latest changes before updating:

git pull origin name_branch

After pushing your changes on your Github fork, you send a pull request by clicking “New Pull Request” button in your account. This allows AMEI team to review your change and discuss together on the potential changes before pushing them on the main repository. You select the reviewers in the right of the page and write some comments to explain your changes or contribution

This part is very important. The faster the team reacts the faster the branches will be merged with the master branch and the work will evolve. After a member requests some feedbacks, you click on the request in the main project and add some comments about it.

Clone this wiki locally