This is a proposed formalisation of our accepted common development workflow. This text is taken from one of the wiki pages of another project I work on, and I thought it was really convenient for preventing people from getting really confused about each other's git branches. We should discuss this, add any changes after discussing them, and finalise this. <(A)3 isis
This is a proposed formalisation of our accepted common development workflow. This text is taken from one of the wiki pages of another project I work on, and I thought it was really convenient for preventing people from getting really confused about each other's git branches. We should discuss this, add any changes after discussing them, and finalise this. <(A)3 isis
== Overview / tl;dr ==
## Overview / tl;dr
In addition to each ooni developer's personal repositories, there are two common repositories. The [https://gitweb.torproject.org/ooniprobe.git official one is here] on torproject.org. The other is [https://github.com/TheTorProject/ooni-probe on github], and is used mainly for our code review process between developers, although it also exists as a friendlier interface for pull requests from potential contributors.
In addition to each ooni developer's personal repositories, there are two common repositories. The [official one is here](https://gitweb.torproject.org/ooniprobe.git) on torproject.org. The other is [on github](https://github.com/TheTorProject/ooni-probe), and is used mainly for our code review process between developers, although it also exists as a friendlier interface for pull requests from potential contributors.
The main branching workflow looks like this:
The main branching workflow looks like this:
{{{
```
__________ ________
__________ ________
|==|=======| |==|=====|
|==|=======| |==|=====|
| | tor | | | git |
| | tor | | | git |
...
@@ -58,31 +58,31 @@ The main branching workflow looks like this:
...
@@ -58,31 +58,31 @@ The main branching workflow looks like this:
*********** ** I don't want to draw | .------------------------------.
*********** ** I don't want to draw | .------------------------------.
* ioerror * all of the things. '->( hellais/fix/####-supercatsulla )
* ioerror * all of the things. '->( hellais/fix/####-supercatsulla )
*********** '------------------------------'
*********** '------------------------------'
}}}
```
'''Create a new feature'''
**Create a new feature**
1. branch from develop
1. branch from develop
2. code
2. code
3. review
3. review
4. merge back into develop
4. merge back into develop
'''Create a release'''
**Create a release**
1. branch from develop
1. branch from develop
2. bug fix
2. bug fix
3. QA
3. QA
4. tag, and merge back into develop and master
4. tag, and merge back into develop and master
== Branches ==
## Branches
See [http://nvie.com/posts/a-successful-git-branching-model/ A successful git branching model] for more information. The slight modification we make is that release tags are made in the release branch before getting merged to master, rather than getting tagged in master.
See [A successful git branching model](http://nvie.com/posts/a-successful-git-branching-model/) for more information. The slight modification we make is that release tags are made in the release branch before getting merged to master, rather than getting tagged in master.
=== master branch ===
### master branch
HEAD always represents a production ready state.
HEAD always represents a production ready state.
* immortal: this branch lives forever
* immortal: this branch lives forever
* merge from: release
* merge from: release
* branch to: hotfix
* branch to: hotfix
=== develop branch ===
### develop branch
HEAD always represents staging for next release.
HEAD always represents staging for next release.
* immortal: this branch lives forever
* immortal: this branch lives forever
...
@@ -90,10 +90,10 @@ HEAD always represents staging for next release.
...
@@ -90,10 +90,10 @@ HEAD always represents staging for next release.
* merge from: release branches, feature branches.
* merge from: release branches, feature branches.
* branch to: feature branches
* branch to: feature branches
=== testing branch ===
### testing branch
HEAD represents the tip of the branch currently being tested, rebased onto the develop branch.
HEAD represents the tip of the branch currently being tested, rebased onto the develop branch.
The purpose of this branch is to push a temporary testing stage to [https://travis-ci.org/TheTorProject/ooni-probe Travis-CI].
The purpose of this branch is to push a temporary testing stage to [Travis-CI](https://travis-ci.org/TheTorProject/ooni-probe).
* named 'testing/<nameofbranchbeingrebasedontodevelopfortesting>'
* named 'testing/<nameofbranchbeingrebasedontodevelopfortesting>'
* mortal: only exists while waiting for the build results from the continuous integration system
* mortal: only exists while waiting for the build results from the continuous integration system
...
@@ -102,7 +102,7 @@ The purpose of this branch is to push a temporary testing stage to [https://trav
...
@@ -102,7 +102,7 @@ The purpose of this branch is to push a temporary testing stage to [https://trav
* commits: none
* commits: none
For example, if isis is reviewing hellais' code in hellais' branch 'fix/1234-fix-some-bug' and wants to check that merging the pull request into the current common staging area (the 'develop' branch) will not result in any unforeseen errors:
For example, if isis is reviewing hellais' code in hellais' branch 'fix/1234-fix-some-bug' and wants to check that merging the pull request into the current common staging area (the 'develop' branch) will not result in any unforeseen errors:
One branch per release; only bugfix commits may be made directly on these branches. Once it is tagged (tag ''must'' be signed) with release version number, it gets merged back into both master and develop and is then killed off.
One branch per release; only bugfix commits may be made directly on these branches. Once it is tagged (tag _must_ be signed) with release version number, it gets merged back into both master and develop and is then killed off.
* name starts with 'release-'
* name starts with 'release-'
* mortal: live for a limited time
* mortal: live for a limited time
...
@@ -129,20 +129,20 @@ One branch per release; only bugfix commits may be made directly on these branch
...
@@ -129,20 +129,20 @@ One branch per release; only bugfix commits may be made directly on these branch