mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 14:29:25 +02:00
GitGraph: added and updated demos to align with some of e2e testing
This commit is contained in:
@@ -73,6 +73,33 @@
|
|||||||
checkout main
|
checkout main
|
||||||
merge develop
|
merge develop
|
||||||
</pre>
|
</pre>
|
||||||
|
<h2>Merge feature to advanced main graph</h2>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
title: Merge feature to advanced main (left-to-right)
|
||||||
|
---
|
||||||
|
gitGraph LR:
|
||||||
|
commit
|
||||||
|
branch newbranch
|
||||||
|
checkout newbranch
|
||||||
|
commit
|
||||||
|
checkout main
|
||||||
|
commit
|
||||||
|
merge newbranch
|
||||||
|
</pre>
|
||||||
|
<pre class="mermaid">
|
||||||
|
---
|
||||||
|
title: Merge feature to advanced main (top-to-bottom)
|
||||||
|
---
|
||||||
|
gitGraph TB:
|
||||||
|
commit
|
||||||
|
branch newbranch
|
||||||
|
checkout newbranch
|
||||||
|
commit
|
||||||
|
checkout main
|
||||||
|
commit
|
||||||
|
merge newbranch
|
||||||
|
</pre>
|
||||||
<h2>Two-way merges</h2>
|
<h2>Two-way merges</h2>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
---
|
---
|
||||||
@@ -236,46 +263,54 @@
|
|||||||
commit
|
commit
|
||||||
merge main
|
merge main
|
||||||
</pre>
|
</pre>
|
||||||
<h2>Three branches graph</h2>
|
<h2>Three branches and a cherry-pick from each graph</h2>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
---
|
---
|
||||||
title: Three branches (left-to-right)
|
title: Three branches and a cherry-pick from each (left-to-right)
|
||||||
---
|
---
|
||||||
gitGraph LR:
|
gitGraph LR:
|
||||||
commit
|
commit id: "ZERO"
|
||||||
branch develop
|
branch develop
|
||||||
checkout develop
|
commit id:"A"
|
||||||
commit
|
|
||||||
branch feature
|
|
||||||
checkout feature
|
|
||||||
commit
|
|
||||||
checkout main
|
checkout main
|
||||||
merge feature id:"Direct to main"
|
commit id:"ONE"
|
||||||
checkout develop
|
checkout develop
|
||||||
merge feature
|
commit id:"B"
|
||||||
commit
|
branch featureA
|
||||||
|
commit id:"FIX"
|
||||||
|
commit id: "FIX-2"
|
||||||
checkout main
|
checkout main
|
||||||
merge develop
|
commit id:"TWO"
|
||||||
|
cherry-pick id:"A"
|
||||||
|
commit id:"THREE"
|
||||||
|
cherry-pick id:"FIX"
|
||||||
|
checkout develop
|
||||||
|
commit id:"C"
|
||||||
|
merge featureA
|
||||||
</pre>
|
</pre>
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
---
|
---
|
||||||
title: Three branches (top-to-bottom)
|
title: Three branches and a cherry-pick from each (top-to-bottom)
|
||||||
---
|
---
|
||||||
gitGraph TB:
|
gitGraph TB:
|
||||||
commit
|
commit id: "ZERO"
|
||||||
branch develop
|
branch develop
|
||||||
checkout develop
|
commit id:"A"
|
||||||
commit
|
|
||||||
branch feature
|
|
||||||
checkout feature
|
|
||||||
commit
|
|
||||||
checkout main
|
checkout main
|
||||||
merge feature id:"Direct to main"
|
commit id:"ONE"
|
||||||
checkout develop
|
checkout develop
|
||||||
merge feature
|
commit id:"B"
|
||||||
commit
|
branch featureA
|
||||||
|
commit id:"FIX"
|
||||||
|
commit id: "FIX-2"
|
||||||
checkout main
|
checkout main
|
||||||
merge develop
|
commit id:"TWO"
|
||||||
|
cherry-pick id:"A"
|
||||||
|
commit id:"THREE"
|
||||||
|
cherry-pick id:"FIX"
|
||||||
|
checkout develop
|
||||||
|
commit id:"C"
|
||||||
|
merge featureA
|
||||||
</pre>
|
</pre>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import mermaid from './mermaid.esm.mjs';
|
import mermaid from './mermaid.esm.mjs';
|
||||||
|
Reference in New Issue
Block a user