98 lines
1.7 KiB
Markdown
98 lines
1.7 KiB
Markdown
# Uniper
|
|
Uniper maintenance hmi project.
|
|
|
|
# Gitflow
|
|
1. A develop branch is created from main
|
|
2. A release branch is created from develop
|
|
3. Feature branches are created from develop
|
|
4. When a feature is complete it is merged into the develop branch
|
|
5. When the release branch is done it is merged into develop and main
|
|
6. If an issue in main is detected a hotfix branch is created from main
|
|
7. Once the hotfix is complete it is merged to both develop and main
|
|
|
|
## Start new feature
|
|
```
|
|
git flow feature start feature_branch
|
|
```
|
|
oder
|
|
```
|
|
git checkout develop
|
|
git checkout -b feature_branch
|
|
```
|
|
|
|
## Finish a feature
|
|
```
|
|
git flow feature finish feature_branch
|
|
```
|
|
oder
|
|
```
|
|
git checkout develop
|
|
git merge feature_branch
|
|
```
|
|
|
|
## Making a release
|
|
```
|
|
git flow release start 0.1.0
|
|
```
|
|
oder
|
|
```
|
|
git checkout develop
|
|
git checkout -b release/0.1.0
|
|
```
|
|
|
|
## Finishing a release
|
|
```
|
|
git flow release finish '0.1.0'
|
|
```
|
|
oder
|
|
```
|
|
git checkout main
|
|
git merge release/0.1.0
|
|
```
|
|
|
|
## Starting a Hotfix
|
|
```
|
|
git flow hotfix start hotfix_branch
|
|
```
|
|
oder
|
|
```
|
|
git checkout main
|
|
git checkout -b hotfix_branch
|
|
```
|
|
|
|
## Finishing a Hotfix
|
|
```
|
|
git flow hotfix finish hotfix_branch
|
|
```
|
|
oder
|
|
```
|
|
git checkout main
|
|
git merge hotfix_branch
|
|
git checkout develop
|
|
git merge hotfix_branch
|
|
git branch -D hotfix_branch
|
|
```
|
|
|
|
## Workflow example
|
|
```
|
|
git checkout main
|
|
git checkout -b develop
|
|
git checkout -b feature_branch
|
|
# work happens on feature branch
|
|
git checkout develop
|
|
git merge feature_branch
|
|
git checkout main
|
|
git merge develop
|
|
git branch -d feature_branch
|
|
```
|
|
|
|
## Hotfix example
|
|
```
|
|
git checkout main
|
|
git checkout -b hotfix_branch
|
|
# work is done commits are added to the hotfix_branch
|
|
git checkout develop
|
|
git merge hotfix_branch
|
|
git checkout main
|
|
git merge hotfix_branch
|
|
``` |