Mar 2, 2018 6:12:25 PM seb leridon avatar   1022

Branch management with GIT

Git Logo

Branches

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.

GIT Workflow

GIT commands

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 . At the end of the developments

git checkout develop
git pull origin develop
git checkout -b JIRA-NNN
git push origin JIRA-NNN
<< making and committing changes >>
git pull origin JIRA-NNN
git checkout develop
git pull origin develop
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