Skip to content

Commit

Permalink
GitGraph: added and updated demos to align with some of e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
guypursey committed Oct 13, 2023
1 parent fbdc286 commit f713548
Showing 1 changed file with 58 additions and 23 deletions.
81 changes: 58 additions & 23 deletions demos/git.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ <h2>Continuous development graph</h2>
checkout main
merge develop
</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>
<pre class="mermaid">
---
Expand Down Expand Up @@ -236,46 +263,54 @@ <h2>Merge from main graph</h2>
commit
merge main
</pre>
<h2>Three branches graph</h2>
<h2>Three branches and a cherry-pick from each graph</h2>
<pre class="mermaid">
---
title: Three branches (left-to-right)
title: Three branches and a cherry-pick from each (left-to-right)
---
gitGraph LR:
commit
commit id: "ZERO"
branch develop
checkout develop
commit
branch feature
checkout feature
commit
commit id:"A"
checkout main
merge feature id:"Direct to main"
commit id:"ONE"
checkout develop
merge feature
commit
commit id:"B"
branch featureA
commit id:"FIX"
commit id: "FIX-2"
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 class="mermaid">
---
title: Three branches (top-to-bottom)
title: Three branches and a cherry-pick from each (top-to-bottom)
---
gitGraph TB:
commit
commit id: "ZERO"
branch develop
checkout develop
commit
branch feature
checkout feature
commit
commit id:"A"
checkout main
merge feature id:"Direct to main"
commit id:"ONE"
checkout develop
merge feature
commit
commit id:"B"
branch featureA
commit id:"FIX"
commit id: "FIX-2"
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>
<script type="module">
import mermaid from './mermaid.esm.mjs';
Expand Down

0 comments on commit f713548

Please sign in to comment.