We are using git for version control. You can find all the latest source code here: https://github.com/AIFDR/inasafe
InaSAFE follows the following simple branching model:
New development takes place in master. Master should always be maintained in a usable state with tests passing and the code functional as far as possible such that we can create a new release from master at short notice.
Releases should take place in long lived branches named after the minor version number (we follow the semantic versioning scheme) so for example the first release would be version 0.1 and would be in a branch from master called release_0-1.
After the minor release branch is made, the point releases (patch) are created as tags off that branch. For example the release flow for version 0.1.0 would be:
After the release, development should take place in master. Additional short lived branches can be made off master while new features are worked on, and then merged into master when they are ready.
Optionally, development can also be carried out in independent forks of the inasafe repository and then merged into master when they are ready via a pull request or patch.
Commits to master that constitute bug fixes to existing features should be backported to the current release branch using the git cherry-pick command. Alternatively, if a fix is made in the release branch, the changeset should be applied to master where appropriate in order to ensure that master includes all bug fixes from the release branches.
To keep branch up to date:
- git checkout <featurebranch>
- git merge origin master
- (possibly resolve conflict and verify test suite runs)
- git push origin <featurebranch>
When all tests pass, either merge into master
- git checkout master
- git merge –no-ff <featurebranch> (possibly resolve conflict and verify test suite runs)
- git push origin master
To delete when branch is no longer needed (though it is preferable to do such work in a fork of the official repo).
- git push origin :<featurebranch>
Create a local tracking branch:
git fetch
git branch --track release-0_1 origin/release-0_1
git checkout release-0_1
Now apply your fix, test and commit:
git commit -m "Fix issue #22 - results do not display"
git push
To backport the fix to master do (you should test after cherry picking and before pushing though):
git checkout master
git cherry-pick 0fh12
git push
Example:
git remote add jeff git://githup.com/jj0hns0n/riab.git
git remote update
git checkout -b impact_map jeff/impact_map
To Switch branches using TortioiseGIT:
To update the master branch:
For subsequent pull requests on that branch you can just do TortoiseGIT->Pull from the context menu and press ok