-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-1932) Linting and ordering of branching strategy
- Loading branch information
Showing
8 changed files
with
216 additions
and
93 deletions.
There are no files selected for viewing
14 changes: 10 additions & 4 deletions
14
docs/input/docs/git-branching-strategies/converting-to-gitflow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Converting to GitFlow | ||
Converting to GitFlow is simple. Whenever you need to convert, simply do the following | ||
--- | ||
Order: 60 | ||
Title: Converting to GitFlow | ||
--- | ||
|
||
``` | ||
Converting to GitFlow is simple. Whenever you need to convert, simply do the | ||
following | ||
|
||
```shell | ||
git checkout master | ||
git checkout -b develop | ||
git push upstream develop | ||
``` | ||
|
||
Afterwards you need to set `develop` to be your default branch. And now all development happens on the `develop` branch | ||
Afterwards you need to set `develop` to be your default branch. And now all | ||
development happens on the `develop` branch |
22 changes: 15 additions & 7 deletions
22
docs/input/docs/git-branching-strategies/creating-updating-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
# Creating/Updating Examples | ||
The examples are generated by GitVersion tests, there are a number of services which will then turn the sequence diagram text into an image to use in the docs. Here are some links which could be useful | ||
--- | ||
Order: 70 | ||
Title: Creating/Updating Examples | ||
--- | ||
|
||
- [PlantUML Sequence Diagrams](http://www.plantuml.com/sequence.html) | ||
- [CodeUML Online editor](http://www.codeuml.com/) | ||
- [PlantText Online editor](http://www.planttext.com/planttext) | ||
- [PlantUML gist renderer](http://uml.mvnsearch.org) | ||
The examples are generated by GitVersion tests, there are a number of services | ||
which will then turn the sequence diagram text into an image to use in the docs. | ||
Here are some links which could be useful | ||
|
||
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.`) | ||
- [PlantUML Sequence Diagrams](http://www.plantuml.com/sequence.html) | ||
- [CodeUML Online editor](http://www.codeuml.com/) | ||
- [PlantText Online editor](http://www.planttext.com/planttext) | ||
- [PlantUML gist renderer](http://uml.mvnsearch.org) | ||
|
||
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.`) | ||
|
||
The tests for the examples should all live at [DocumentationSamples.cs](https://github.com/GitTools/GitVersion/blob/master/src/GitVersionCore.Tests/IntegrationTests/DocumentationSamples.cs) |
66 changes: 49 additions & 17 deletions
66
docs/input/docs/git-branching-strategies/gitflow-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,85 @@ | ||
# GitFlow Examples | ||
These examples are using the *default* configuration with GitVersion. Which is [continuous deployment](../reference/continuous-deployment.md) mode for `develop` and [continuous delivery](../reference/continuous-delivery.md) mode for all other branches. | ||
--- | ||
Order: 40 | ||
Title: GitFlow Examples | ||
--- | ||
|
||
This default configuration allows you to publish CI builds from develop to a CI MyGet feed, or another CI feed. Then all other branches are manually released then tagged. Read more about this at [version increments](../more-info/version-increments.md). | ||
These examples are using the *default* configuration with GitVersion. Which is | ||
[continuous deployment](../reference/continuous-deployment.md) mode for | ||
`develop` and [continuous delivery](../reference/continuous-delivery.md) mode | ||
for all other branches. | ||
|
||
This default configuration allows you to publish CI builds from develop to a CI | ||
MyGet feed, or another CI feed. Then all other branches are manually released | ||
then tagged. Read more about this at [version increments](../more-info/version-increments.md). | ||
|
||
## Feature Branches | ||
Feature branches will take the feature branch name and use that as the pre-release tag. | ||
|
||
Feature branches will take the feature branch name and use that as the | ||
pre-release tag. | ||
|
||
![GitFlow](img/05119d0cd4ecaaefff94_feature-branch.png) | ||
|
||
Notice after the feature branch is merged, the version on `develop` is `1.3.0-alpha.3`. This is due to `develop` running in *continuous deployment* mode. If you configured `develop` to use *continuous delivery* the version would still be `1.3.0-alpha.1` and you would have to use release tags to increment the `alpha.1`. | ||
Notice after the feature branch is merged, the version on `develop` is | ||
`1.3.0-alpha.3`. This is due to `develop` running in *continuous deployment* | ||
mode. If you configured `develop` to use *continuous delivery* the version would | ||
still be `1.3.0-alpha.1` and you would have to use release tags to increment the | ||
`alpha.1`. | ||
|
||
You can see the difference on the feature branch itself, notice the version is the same before and after the commit on the feature branch? Only the metadata has changed. If you released the feature branch artifacts then tagged the commit, the following commit would increase to `-beta.2`. | ||
You can see the difference on the feature branch itself, notice the version is | ||
the same before and after the commit on the feature branch? Only the metadata | ||
has changed. If you released the feature branch artifacts then tagged the | ||
commit, the following commit would increase to `-beta.2`. | ||
|
||
## Pull Request | ||
|
||
Because feature branches are most likely pushed to a fork, we are showing the | ||
pull request branch name which is created when you submit a pull request | ||
|
||
![GitFlow](img/09fdf46995b771f3164a_pull-request.png) | ||
|
||
|
||
## Hotfix Branches | ||
Hotfix branches are used when you need to do a *patch* release in GitFlow and are always created off `master` | ||
|
||
![GitFlow](img/f26ae57adbd9b74f74c4_hotfix.png) | ||
Hotfix branches are used when you need to do a *patch* release in GitFlow and | ||
are always created off `master` | ||
|
||
![GitFlow](img/f26ae57adbd9b74f74c4_hotfix.png) | ||
|
||
## Minor Release Branches | ||
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. | ||
|
||
![GitFlow](img/6d33d35a70a777608fa1_minor-release.png) | ||
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. | ||
|
||
![GitFlow](img/6d33d35a70a777608fa1_minor-release.png) | ||
|
||
## Major Release Branches | ||
Major releases are just like minor releases, the difference is you bump the major in the release branch name. | ||
|
||
![GitFlow](img/39f9d8b8b007c82f1f80_major-release.png) | ||
Major releases are just like minor releases, the difference is you bump the | ||
major in the release branch name. | ||
|
||
![GitFlow](img/39f9d8b8b007c82f1f80_major-release.png) | ||
|
||
## Support Branches | ||
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`) | ||
|
||
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`) | ||
|
||
### Hotfix | ||
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. | ||
![GitFlow](img/b035b8ca99bd34239518_support-hotfix.png) | ||
|
||
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. | ||
![GitFlow](img/b035b8ca99bd34239518_support-hotfix.png) | ||
|
||
### Minor Release | ||
![GitFlow](img/2167fb1c4a5cf84edfd8_support-minor.png) | ||
|
||
![GitFlow](img/2167fb1c4a5cf84edfd8_support-minor.png) | ||
|
||
## To Update/Contribute | ||
|
||
See [creating/updating examples](creating-updating-examples.md) |
8 changes: 6 additions & 2 deletions
8
docs/input/docs/git-branching-strategies/gitflow-examples_complete.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
# GitFlow Examples | ||
--- | ||
Order: 80 | ||
Title: GitFlow Examples | ||
--- | ||
|
||
![GitFlow](http://uml.mvnsearch.org/gist/cf053d7f5d336ae9f7bb) | ||
|
||
## Source | ||
|
||
See `DocumentationSamples.GitFlowExample`. To update, modify then run test. Update [https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb](https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb) | ||
See `DocumentationSamples.GitFlowExample`. To update, modify then run test. | ||
Update [https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb](https://gist.github.com/JakeGinnivan/cf053d7f5d336ae9f7bb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
docs/input/docs/git-branching-strategies/githubflow-examples.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
# GitHubFlow Examples | ||
--- | ||
Order: 50 | ||
Title: GitHubFlow Examples | ||
--- | ||
|
||
## Feature branch | ||
|
||
![GitHubFlow](img/githubflow_feature-branch.png) | ||
|
||
## Pull requests | ||
|
||
![GitHubFlow](img/githubflow_pull-request.png) | ||
|
||
## Release branch | ||
Release branches can be used in GitHubFlow as well as GitFlow. Sometimes you want to start on a large feature which may take a while to stabilise so you want to keep it off master. In these scenarios you can either create a long lived feature branch (if you do not know the version number this large feature will go into, and it's non-breaking) otherwise you can create a release branch for the next major version. You can then submit pull requests to the long lived feature branch or the release branch. | ||
|
||
Release branches can be used in GitHubFlow as well as GitFlow. Sometimes you | ||
want to start on a large feature which may take a while to stabilise so you want | ||
to keep it off master. In these scenarios you can either create a long lived | ||
feature branch (if you do not know the version number this large feature will go | ||
into, and it's non-breaking) otherwise you can create a release branch for the | ||
next major version. You can then submit pull requests to the long lived feature | ||
branch or the release branch. | ||
|
||
![GitFlow](img/githubflow_release-branch.png) |
Oops, something went wrong.