git graph test

This commit is contained in:
2024-10-20 20:42:19 +03:00
parent 600ee855a3
commit f23d5694bd

View File

@@ -67,16 +67,87 @@ Class08 <--> C2: Cool label
## [Git graph](https://mermaid.js.org/syntax/gitgraph.html)
```mermaid
---
title: Git graph example
---
gitGraph
commit id: "1"
commit id: "2" tag: "v1.0.0"
branch dev
commit id: "3" type: REVERSE
commit id: "4"
commit id: "5"
checkout main
commit id: "6"
commit id: "7"
merge dev
commit id: "8"
commit id: "9"
```
---
Hiding Branch names and lines
```mermaid
%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': false}} }%%
gitGraph
commit
branch hotfix
checkout hotfix
commit
branch develop
checkout develop
commit id:"ash" tag:"abc"
branch featureB
checkout featureB
commit type:HIGHLIGHT
checkout main
checkout hotfix
commit type:NORMAL
checkout develop
commit type:REVERSE
checkout featureB
commit
checkout main
merge hotfix
checkout featureB
commit
checkout develop
branch featureA
commit
checkout develop
merge hotfix
checkout featureA
commit
checkout featureB
commit
checkout develop
merge featureA
branch release
checkout release
commit
checkout main
commit
checkout release
merge main
checkout develop
merge release
```
```mermaid
gitGraph TB:
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
merge develop
commit
commit
```
## [XY Chart](https://mermaid.js.org/syntax/xyChart.html)