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

Both sides previous revision Previous revision
Next revision
Previous revision
content:servalmesh:git_master_branch [26/08/2013 21:13]
Andrew Bettison add [Branch HEAD] section with git describe command
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 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.
Line 7: Line 7:
 ==== Branch HEAD ==== ==== 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:]] and is tagged with the release's [[version numbering|version number]] 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>+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 $ git describe origin/master
 0.91 0.91
 $ $
 </code> </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 ====
content/servalmesh/git_master_branch.1377576805.txt.gz · Last modified: 26/08/2013 21:13 by Andrew Bettison