User Tools

Site Tools


content:servalmesh:git_master_branch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
content:servalmesh:git_master_branch [26/08/2013 21:05]
Andrew Bettison created
content:servalmesh:git_master_branch [27/08/2013 00:57] (current)
Andrew Bettison [Rules for committing]
Line 1: Line 1:
 ====== Batphone Git master branch ====== ====== Batphone Git master branch ======
  
-The [[https://github.com/servalproject/batphone/tree/master|master branch]] of the [[Batphone Git repository]] contains all the commits from which were built all the [[.:release:|public releases]] of [[.:]], ie, all versions of the source code which are identifiable by a [[version numbering|version number]]+The [[https://github.com/servalproject/batphone/tree/master|master branch]] of the [[Batphone Git repository]] contains all the commits from which were built all the [[.:releases:|public releases]] of [[.:]], ie, all versions of the source code which are identifiable by a [[version numbering|version number]].
- +
-The HEAD of the master branch is the source code of the most recent release.+
  
 The master branch is not used for development or debugging.  That activity is performed using the [[Git development branch]] or feature branches. The master branch is not used for development or debugging.  That activity is performed using the [[Git development branch]] or feature branches.
 +
 +==== Branch HEAD ====
 +
 +The [[http://git-scm.com/book/en/Git-Internals-Git-References#The-HEAD|HEAD]] of the master branch is the source code of the most recent [[.:release:|release]] and always has the following properties:
 +  * it is tagged with the release's [[version numbering|version number]] (an annotated tag) --- see below
 +  * it is always a merge commit (usually empty; see below) of the prior release and the final release candidate for the current release. 
 +
 +==== Common queries ====
 +
 +The following [[:content:dev:git]] command performed in an [[.:Batphone Git repository|up-to-date Git clone of the Batphone repository]] will always reveal the latest release or release candidate:<code>
 +$ git describe origin/master
 +0.91
 +$
 +</code>
 +
 +This works as long as the committing and tagging rules (see below) are followed.
 + 
 +==== Rules for committing ====
 +
 +Source code on the master branch is never edited and committed directly (unlike the [[Git development branch]]).
 +
 +The head of the master branch can only be advanced by [[:content:dev:Senior Developer|senior developers]]:
 +  * Merging in a release branch at the [[.:release:Finish the release process|conclusion]] of a [[.:release:]].  This must be done using the **''<nowiki>--no-ff</nowiki>''** option to avoid a [[http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging|fast-forward merge]], to ensure that there is a distinct commit for every version, since release tags (see below) cannot share the same commit.
  
 ==== Release tags ==== ==== Release tags ====
  
-Each released commit on the master branch is tagged with its [[version numbering|version number]].  Every release tag **must be [[http://git-scm.com/book/ch2-6.html#Annotated-Tags|annotated]]**, otherwise the [[http://git-scm.com/docs/git-describe|Git describe]] command will not produce the correct result.+Each released commit on the master branch is tagged with its [[version numbering|version number]], for example [[https://github.com/servalproject/batphone/tree/0.08|0.08]], [[https://github.com/servalproject/batphone/tree/0.90|0.90]].  Every release tag **must be [[http://git-scm.com/book/ch2-6.html#Annotated-Tags|annotated]]**, otherwise the [[http://git-scm.com/docs/git-describe|Git describe]] command will not produce the correct result.
  
 The following [[:content:dev:git]] command performed in an [[.:Batphone Git repository|up-to-date Git clone of the Batphone repository]] will list all the release tags and the first lines of their annotations:<code> The following [[:content:dev:git]] command performed in an [[.:Batphone Git repository|up-to-date Git clone of the Batphone repository]] will list all the release tags and the first lines of their annotations:<code>
content/servalmesh/git_master_branch.1377576359.txt.gz · Last modified: 26/08/2013 21:05 by Andrew Bettison