Skip to content

Commit 5ee27f5

Browse files
committed
Switched from a complete example to broken down examples of each type of branch
1 parent 2607b9d commit 5ee27f5

File tree

5 files changed

+206
-92
lines changed

5 files changed

+206
-92
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Creating/Updating Examples
2+
The examples are generated by GitVersion tests, put into gists then use a service to render them as sequence diagrams.
3+
4+
- [Plantuml gist rendering service](http://uml.mvnsearch.org)
5+
6+
The tests are quite simple. Using the methods on the `fixture` itself will record that action in the sequence diagram. If you do not want the action recorded perform the action directly on the repository (`fixture.Repository.`)

docs/git-branching-strategies/gitflow-examples.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
# GitFlow Examples
2+
## Feature Branches
3+
Feature branches will take the feature branch name and use that as the pre-release tag.
4+
5+
![GitFlow](http://uml.mvnsearch.org/gist/05119d0cd4ecaaefff94)
6+
7+
8+
## Pull Request
9+
Because feature branches are most likely pushed to a fork, we are showing the
10+
pull request branch name which is created when you submit a pull request
11+
12+
![GitFlow](http://uml.mvnsearch.org/gist/09fdf46995b771f3164a)
13+
14+
15+
## Hotfix Branches
16+
Hotfix branches are used when you need to do a *patch* release in GitFlow and are always created off `master`
17+
18+
![GitFlow](http://uml.mvnsearch.org/gist/f26ae57adbd9b74f74c4)
19+
20+
21+
## Minor Release Branches
22+
Release branches are used for both major and minor releases for stabilisation before a release. Release branches are taken off `develop` then merged to both `develop` and `master`. Finally `master` is tagged with the released version.
23+
24+
![GitFlow](http://uml.mvnsearch.org/gist/6d33d35a70a777608fa1)
25+
26+
27+
## Major Release Branches
28+
Major releases are just like minor releases, the difference is you bump the major in the release branch name.
29+
30+
![GitFlow](http://uml.mvnsearch.org/gist/39f9d8b8b007c82f1f80)
31+
32+
33+
## Support Branches
34+
Support branches are not really covered in GitFlow, but are essential if you need to maintain multiple major versions at the same time. You could use support branches for supporting minor releases as well. If you are just supporting the majors, then name your branch `support/<major>.x` (i.e `support/1.x`), to support minors use `support/<major>.<minor>.x` or `support/<major>.<minor>.0`. (i.e `support/1.3.x` or `support/1.3.0`)
35+
36+
### Hotfix
37+
Depending on what you name your support branch, you may or may not need a hotfix branch. Naming it `support/1.x` will automatically bump the patch, if you name it `support/1.3.0` then the version in branch name rule will kick in and the patch *will not* automatically bump, meaning you have to use hotfix branches.
38+
![GitFlow](http://uml.mvnsearch.org/gist/b035b8ca99bd34239518)
39+
40+
41+
### Minor Release
42+
![GitFlow](http://uml.mvnsearch.org/gist/2167fb1c4a5cf84edfd8)
243

3-
![GitFlow](http://uml.mvnsearch.org/gist/cf053d7f5d336ae9f7bb)
444

545
## Source
646

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# GitFlow Examples
2+
3+
![GitFlow](http://uml.mvnsearch.org/gist/cf053d7f5d336ae9f7bb)
4+
5+
## Source
6+
7+
See `DocumentationSamples.GitFlowExample`. To update, modify then run test. Update [https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb](https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb)

src/GitVersionCore.Tests/Fixtures/RepositoryFixtureBase.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ public void BranchTo(string branchName, string @as = null)
8787
diagramBuilder.Append("create ");
8888
Participant(branchName, @as);
8989
}
90-
else
91-
{
92-
NoteOver(branchName, branchName, prefix: "h");
93-
}
9490

9591
var branch = Repository.Head.Name;
9692
diagramBuilder.AppendLineFormat("{0} -> {1}: branch from {2}", GetParticipant(branch), GetParticipant(branchName), branch);

0 commit comments

Comments
 (0)