Skip to content

Instantly share code, notes, and snippets.

@JakeGinnivan
Last active July 2, 2024 13:51
Show Gist options
  • Save JakeGinnivan/cf053d7f5d336ae9f7bb to your computer and use it in GitHub Desktop.
Save JakeGinnivan/cf053d7f5d336ae9f7bb to your computer and use it in GitHub Desktop.
Overview of GitFlow and versions generated by GitVersion
@startuml
participant "pull/2/merge" as feature
participant develop
participant "release/2.0.0" as majorRelease
participant "release/1.3.0" as minorRelease
participant master
activate develop
activate master
master -> master: commit
master -> master: tag 1.2.0
== Feature branch ==
note over feature, master
Feature branches are likely pushed to a fork,
then submit a PR.pull/2/merge is what your build server sees when
you submit a PR with #2
end note
hnote over develop
develop
end note
master -> develop: branch from master
develop -> develop: commit
note over develop #D3D3D3: 1.3.0-unstable.1
hnote over feature
pull/2/merge
end note
develop -> feature: branch from develop
activate feature
note over feature #D3D3D3: 1.3.0-PullRequest.2+1
feature -> feature: commit
note over feature #D3D3D3: 1.3.0-PullRequest.2+2
feature -> develop: merge
destroy feature
note over feature
Feature branches/pr's should
be deleted once merged
end note
note over develop #D3D3D3: 1.3.0-unstable.3
== Hotfix release ==
note over feature, master
Hotfix branches are short lived branches
which allow you to do SemVer patch releases
end note
create participant "hotfix/1.2.1" as hotfix
master -> hotfix: branch from master
activate hotfix
hotfix -> hotfix: commit
hotfix -> hotfix: commit
note over hotfix #D3D3D3: 1.2.1-beta.1+2
hotfix -> hotfix: tag 1.2.1-beta.1
note over hotfix #D3D3D3: 1.2.1-beta.1
hotfix -> master: merge
destroy hotfix
note over hotfix
Hotfix branches are deleted once merged
end note
master -> master: tag 1.2.1
== Minor Release ==
note over feature, master
In GitFlow the release branch is taken from develop
end note
hnote over minorRelease
release/1.3.0
end note
develop -> minorRelease: branch from develop
activate minorRelease
note over minorRelease #D3D3D3: 1.3.0-beta.1+0
develop -> develop: commit
note over develop #D3D3D3: 1.3.0-unstable.4
minorRelease -> minorRelease: commit
note over minorRelease #D3D3D3: 1.3.0-beta.1+1
minorRelease -> minorRelease: tag 1.3.0-beta.1
note over minorRelease #D3D3D3: 1.3.0-beta.1
minorRelease -> minorRelease: commit
note over minorRelease #D3D3D3: 1.3.0-beta.2+2
minorRelease -> master: merge
note over master #D3D3D3: 1.3.0+0
master -> master: tag 1.3.0
note over master #D3D3D3: 1.3.0
minorRelease -> develop: merge
note over minorRelease
Release branches are deleted once merged
end note
note over develop #D3D3D3: 1.4.0-unstable.2
== Major Release ==
hnote over majorRelease
release/2.0.0
end note
develop -> majorRelease: branch from develop
note over majorRelease #D3D3D3: 2.0.0-beta.1+0
develop -> develop: commit
note over develop #D3D3D3: 1.4.0-unstable.3
majorRelease -> majorRelease: commit
note over majorRelease #D3D3D3: 2.0.0-beta.1+1
majorRelease -> majorRelease: tag 2.0.0-beta.1
note over majorRelease #D3D3D3: 2.0.0-beta.1
majorRelease -> majorRelease: commit
note over majorRelease #D3D3D3: 2.0.0-beta.2+2
majorRelease -> master: merge
note over master #D3D3D3: 2.0.0+0
master -> master: tag 2.0.0
note over master #D3D3D3: 2.0.0
majorRelease -> develop: merge
note over majorRelease
Release branches are deleted once merged
end note
note over develop #D3D3D3: 2.1.0-unstable.2
== Support Branches ==
note over feature, hotfix
Support branches allow you to create stable releases of a previous major or minor release.
A support branch is essentially master for an old release
end note
create participant "support/1.3.0" as support
master -> support: branch from tag (1.3.0)
activate support
support -> support: commit
note over support #D3D3D3: 1.3.0+1
create participant "hotfix/1.3.1" as hotfix2
support -> hotfix2: branch from support/1.3.0
activate hotfix2
hotfix2 -> hotfix2: commit
hotfix2 -> hotfix2: commit
note over hotfix2 #D3D3D3: 1.3.1-beta.1+3
hotfix2 -> hotfix2: tag 1.3.1-beta.1
note over hotfix2 #D3D3D3: 1.3.1-beta.1
hotfix2 -> support: merge
destroy hotfix2
note over hotfix2
Hotfix branches are deleted once merged
end note
note over support #D3D3D3: 1.3.1+4
support -> support: tag 1.3.1
note over support #D3D3D3: 1.3.1
== Minor release via support ==
note over feature, hotfix2
Much like hotfixing an old version you can release minor versions of old
releases using support branches
end note
create participant "release/1.4.0" as supportRelease
support -> supportRelease: branch from support/1.3.0
activate supportRelease
supportRelease -> supportRelease: commit
supportRelease -> supportRelease: commit
note over supportRelease #D3D3D3: 1.4.0-beta.1+2
supportRelease -> supportRelease: tag 1.4.0-beta.1
note over supportRelease #D3D3D3: 1.4.0-beta.1
supportRelease -> support: merge
destroy supportRelease
note over supportRelease
Release branches are deleted once merged
end note
note over support #D3D3D3: 1.4.0+0
support -> support: tag 1.4.0
note over support #D3D3D3: 1.4.0
@enduml
@arjunbingi
Copy link

how to skip to generate tag on develop branch by using gitversion.yml?
any one know help on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment