Skip to content

Commit

Permalink
Added more example diagrams to test with.
Browse files Browse the repository at this point in the history
  • Loading branch information
guypursey committed Oct 7, 2023
1 parent 64c2b9b commit c3c5c29
Showing 1 changed file with 71 additions and 9 deletions.
80 changes: 71 additions & 9 deletions demos/git.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,88 @@
<h1>Git diagram demo</h1>
<pre class="mermaid">
---
title: Simple Git diagram
title: Simple "branch and merge"
---
gitGraph:
options
{
"nodeSpacing": 50,
"nodeRadius": 5
}
end
branch master
commit
branch newbranch
checkout newbranch
commit
checkout main
merge newbranch
</pre>

<pre class="mermaid">
---
title: Continuous development
---
gitGraph:
commit
branch develop
checkout develop
commit
checkout main
merge develop
checkout develop
commit
checkout main
merge develop
</pre>
<pre class="mermaid">
---
title: Two-way merges
---
gitGraph:
commit
branch develop
checkout develop
commit
checkout main
merge develop
commit
checkout develop
merge main
commit
checkout master
checkout main
merge develop
</pre>
<pre class="mermaid">
---
title: Cherry-pick
---
gitGraph:
commit
branch newbranch
checkout newbranch
commit id: "Pick me"
checkout main
commit
checkout newbranch
commit
checkout main
cherry-pick id: "Pick me"
merge newbranch
</pre>
<pre class="mermaid">
---
title: Three branches
---
gitGraph:
commit
branch develop
checkout develop
commit
branch feature
checkout feature
commit
checkout main
merge feature id:"Direct to main"
checkout develop
merge feature
commit
checkout main
merge develop
</pre>

<script type="module">
import mermaid from './mermaid.esm.mjs';
Expand Down

0 comments on commit c3c5c29

Please sign in to comment.