Skip to content

Git flow

Jammyjamjamman edited this page Mar 16, 2023 · 4 revisions

Info

Git flow - a successful Git branching model

http://nvie.com/posts/a-successful-git-branching-model/

Original git-flow implementation

https://github.com/nvie/gitflow

Improved git-flow implementation (we used this)

https://github.com/petervanderdoes/gitflow

Git-flow cheat sheet

http://danielkummer.github.io/git-flow-cheatsheet/

In MegaGlest

MegaGlest 3.11.0 was our first release using both the Git flow approach and the implementation by Peter van der Does. It wasn't perfect (we had the version set before doing the release branch, megaglest-data only had a single branch at the time), but it went well.

Here's how we did it:

(1) in the megaglest-source repository, on the 'develop' branch, use "git flow release start 3.11.0" to create a release branch.

(2) in the megaglest-source repository, on the 'release' branch, run "git flow release publish 3.11.0"

(3) in the megaglest-source repository, on the 'release' branch, run "git flow release finish 3.11.0", then "git push --tags"

(4) in the megaglest-data repository on the 'master' branch, "git tag 3.11.0" and "git push --tags"

(5 or on beginning) in the megaglest-data repository, create a new 'develop' branch based on the current 'master' branch there ("git branch develop; git checkout develop" [when you are on master])

(6) in the megaglest-source repository, on the 'develop' branch, commit the reference to the megaglest-data repository's 'develop' branch

in the future even if data repository will have "release" branch then better is finish this first and then on source repository point to data "master"

Terminal output running the above commands:

https://paste.kde.org/punqvxect/6yujgt



Since MegaGlest 3.11.1 our sequence should look like this:

Start:

(1) in the megaglest-data repository, on the 'develop' branch, use "git flow release start 3.11.1" to create a release branch.

(2) in the megaglest-data repository, on the 'release' branch, run "git flow release publish 3.11.1"

(3) in the megaglest-data repository, on the 'release' branch, commit changes reguired for release (if you know any).

(4) in the megaglest-source repository, on the 'develop' branch, use "git flow release start 3.11.1" to create a release branch.

(5) in the megaglest-source repository, on the 'release' branch, run "git flow release publish 3.11.1"

(6) in the megaglest-source repository, on the 'release' branch, set a version number for release (3.11.1 > version.txt etc.) and commit other changes reguired for release, e.g. synchronize submodules.

Finish:

(7) in the megaglest-masterserver and megaglest-data-source repositories merge changes from 'develop' to 'master' (if merge is needed) and set there release tags, "git checkout master && git tag 3.11.1 && git push --tags" (setting a tag is possible also by github api).

(8) in the megaglest-data repository, on the 'release' branch, run "git flow release finish 3.11.1", then "git checkout develop && git push; git checkout master && git push && git push --tags".

(9) in the megaglest-source repository, on the 'release' branch, synchronize data submodule (its 'master' branch or '3.11.1'), then run "git flow release finish 3.11.1", then "git checkout develop && git push; git checkout master && git push && git push --tags".

(10) in the megaglest-source and megaglest-data repositories on the 'master' branch or on '3.11.1' build release packages/archives.

(11) in the megaglest-source repository, checkout to 'develop' branch and set version number for development (e.g. 3.12-dev > version.txt etc.) and commit/push it.

Clone this wiki locally