... | @@ -21,3 +21,81 @@ Download from: https://git-scm.com/ |
... | @@ -21,3 +21,81 @@ Download from: https://git-scm.com/ |
|
* Feature branching: one feature = one branch, merge to main when feature is stable and close branch
|
|
* Feature branching: one feature = one branch, merge to main when feature is stable and close branch
|
|
* GitFlow: develop branch -> release branch -> main branch (more details [here](https://www.gitkraken.com/learn/git/git-flow))
|
|
* GitFlow: develop branch -> release branch -> main branch (more details [here](https://www.gitkraken.com/learn/git/git-flow))
|
|
* Personal branching: one person = one branch, merge to main when feature is stable and keep working on next feature in same branch.
|
|
* Personal branching: one person = one branch, merge to main when feature is stable and keep working on next feature in same branch.
|
|
|
|
|
|
|
|
|
|
|
|
### Feature branching
|
|
|
|
|
|
|
|
You can do git graphs in mermaid ? Amazing ! I think I'll need to do a mermaid seminar !
|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
%%{init: {'theme': 'base' } }%%
|
|
|
|
gitGraph:
|
|
|
|
commit tag: "v1.0"
|
|
|
|
commit
|
|
|
|
branch feature/segmentation-label
|
|
|
|
commit
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
branch feature/train-unet
|
|
|
|
commit
|
|
|
|
commit
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
merge feature/segmentation-label tag: "v1.1"
|
|
|
|
merge feature/train-unet tag: "v2.0"
|
|
|
|
```
|
|
|
|
|
|
|
|
### Git flow
|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
%%{init: {'theme': 'base' } }%%
|
|
|
|
gitGraph:
|
|
|
|
commit tag: "v1.0"
|
|
|
|
branch hotfix
|
|
|
|
branch release/2.0
|
|
|
|
commit
|
|
|
|
branch develop
|
|
|
|
commit
|
|
|
|
branch feature/segmentation-label
|
|
|
|
commit
|
|
|
|
checkout develop
|
|
|
|
branch feature/train-unet
|
|
|
|
commit
|
|
|
|
checkout hotfix
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
merge hotfix tag: "v1.1"
|
|
|
|
checkout feature/train-unet
|
|
|
|
commit
|
|
|
|
checkout develop
|
|
|
|
merge feature/segmentation-label
|
|
|
|
merge feature/train-unet
|
|
|
|
checkout release/2.0
|
|
|
|
merge develop
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
merge release/2.0 tag: "v2.0"
|
|
|
|
```
|
|
|
|
|
|
|
|
### Personal branching
|
|
|
|
|
|
|
|
```mermaid
|
|
|
|
%%{init: {'theme': 'base' } }%%
|
|
|
|
gitGraph:
|
|
|
|
commit tag: "v1.0"
|
|
|
|
branch dev/afo
|
|
|
|
branch dev/ael
|
|
|
|
branch dev/tvd
|
|
|
|
checkout dev/afo
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
merge dev/afo
|
|
|
|
checkout dev/ael
|
|
|
|
commit
|
|
|
|
commit
|
|
|
|
checkout dev/tvd
|
|
|
|
commit
|
|
|
|
checkout main
|
|
|
|
merge dev/tvd
|
|
|
|
merge dev/ael tag: "v2.0"
|
|
|
|
``` |
|
|
|
\ No newline at end of file |