Difference between revisions of "Git Branching Strategy"

From Gcube Wiki
Jump to: navigation, search
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* The ''master'' branch is the stable branch
+
* The ''master'' branch is the stable branch. Must be always in a releasable state.
* One (and only one) develop (named ''dev'') branch is created from ''master''
+
* Feature (named ''feature/issue'') branches are created from ''master'' (issue is the tracker issue number that describes the feature).
* Feature (named ''feature/issue'') branches are created from ''dev''
+
* Occasionally, feature branches can be created from other feature branches, although this is a discouraged practice.
* When a ''feature'' is complete it is merged into the ''dev'' branch
+
* Features may be experimental. If not pursued, branches are discarded without corrupting the stability of the ''master'' branch.
* When ''dev'' has enough stable features to release it is merged into ''master''
+
* When a feature is complete, the corresponding ''feature'' branch is merged into the ''master'' branch.
* If an issue (typically a bug requiring immediate attention) in ''master'' is detected a ''hotfix/issue'' branch is created from ''master''
+
* When ''master'' has enough stable features, it is released
* Once the hotfix is complete it is merged to both ''dev'' and ''master''
+
* If an issue (typically a bug requiring immediate attention) in ''master'' is detected, a ''hotfix/issue'' branch is created from ''master'' (issue is the tracker issue number that reports the problem)
 +
* Once the ''hotfix'' is complete it is merged to ''master'' and any open ''feature'' branch (if needed)
  
[[File:Git Branching strategy.v4.png|800px]]
+
[[File:Git Branching strategy.v5.png|1000px]]
 +
 
 +
Please visit the following link to learn how to branch and merge with git
 +
[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging]
 +
 
 +
== Sample usage ==
 +
 
 +
At any time, list the Maven-parent repository's branches on Gitea:
 +
 
 +
[[File:Gitea-maven-parent-branches.png|400px]]
 +
 
 +
Then, by clicking on the "Issues" link, it will open the corresponding issues on the tracker system:
 +
 
 +
[[File:Tracker-maven-parent-issues.png|700px]]
  
 
''Back to the [[Continuous_Integration_procedure_(2019) | CI guide]].''
 
''Back to the [[Continuous_Integration_procedure_(2019) | CI guide]].''
 +
 +
[[Category:Continuous_Integration]]

Latest revision as of 10:38, 4 July 2019

  • The master branch is the stable branch. Must be always in a releasable state.
  • Feature (named feature/issue) branches are created from master (issue is the tracker issue number that describes the feature).
  • Occasionally, feature branches can be created from other feature branches, although this is a discouraged practice.
  • Features may be experimental. If not pursued, branches are discarded without corrupting the stability of the master branch.
  • When a feature is complete, the corresponding feature branch is merged into the master branch.
  • When master has enough stable features, it is released
  • If an issue (typically a bug requiring immediate attention) in master is detected, a hotfix/issue branch is created from master (issue is the tracker issue number that reports the problem)
  • Once the hotfix is complete it is merged to master and any open feature branch (if needed)

Git Branching strategy.v5.png

Please visit the following link to learn how to branch and merge with git https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

Sample usage

At any time, list the Maven-parent repository's branches on Gitea:

Gitea-maven-parent-branches.png

Then, by clicking on the "Issues" link, it will open the corresponding issues on the tracker system:

Tracker-maven-parent-issues.png

Back to the CI guide.