Skip to content

Instantly share code, notes, and snippets.

@edeustace
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save edeustace/cb3ca1d832a7e76ad846 to your computer and use it in GitHub Desktop.

Select an option

Save edeustace/cb3ca1d832a7e76ad846 to your computer and use it in GitHub Desktop.
Git workflow for working with Releases

Git workflow for when working with releases.

Basic rules

  • use semver
  • master is the release branch
  • when a release is created the commit is tagged
  • feature branches are children of master and are merged back to master, at which point a release is created/tagged (see above)
  • fix branches are children of the tag the fix is being applied to, once complete a release is created and a new tag is generated, no need to merge back to a release branch. if needed the fix is merged to master and another release/tag is created.

An example

A new feature:

* <------------- 0.0.1/master
|\
* * <----------- feature/one
| |
|/
* <-------------- merge feature/one
|
* <-------------- release and tag v0.1.0

Fixes

Fixes that don't need to be merged back to master

* <-------------- 0.0.1/master
|\
* * <------------ branch fix/0.0.2
| |
| * <------------ release and tag v0.0.2
|  \
*  * <----------- branch fix/0.0.3 (child of tag v0.0.2)
|  |
*  * <----------- release and tag v0.0.3

Fixes that do need to be merged back:

* <-------------- 0.0.1/master
|\
* * <------------ branch fix/0.0.2
| |
| * <------------ release and tag v0.0.2
|/ \
*  * <----------- branch fix/0.0.3 (child of tag v0.0.2)
|  |
*  * <----------- release and tag v0.0.3
| /
*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment