GIT branching rules
For generic plugins and the core, two permanent branches are used:
- the branch develop is the branch in which all the developments are made.
- the branch master corresponding to the code in its release version. No commit must be done on this branch. A merge of the branch develop is made in this branch at the time of the releases.
Temporary branches can be created for new features. Their name corresponds to the code of evolution JIRA.
For a small correction or evolution
It is not necessary to create a branch. The modification can be done directly on the branch develop
git checkout develop git pull origin develop << making and committing changes >> git push origin develop
For a correction or significant evolution
A temporary branch feature (where feature is the JIRA code of the evolution or the correstion) must be created. The development is done on the feature branch. The branch is shared on the repository origin .
git checkout develop git pull origin develop git checkout -b JIRA-NNN << making and committing changes >> git push origin JIRA-NNN
Then, after validation of the feature to merge :
git pull origin JIRA-NNN git checkout develop git pull origin develop --rebase git merge JIRA-NNN git push origin develop
For an external contribution
The author of the contribution must forge the project and create a branch corresponding to the JIRA of his contribution. He can then offer his contribution by the mechanism of Pull Request of GitHub
- On github.com, fork the Lutece plugin repository
- Add this new remote repository to your local repository containing the JIRA-NNN branch
git remote add myFork https://github.com/<my_github_user>/<my_forked_repository>
- Push the branch JIRA-NNN on your forked repository
git push myFork JIRA-NNN
- From your forked repository, create the pull request from <user repository>/<plugin>/<JIRA-NNN> to <lutece-platform repository>/<plugin>/develop