2022-09-26 18:15:13 -07:00
|
|
|
<!DOCTYPE html>
|
2022-10-02 13:51:25 -07:00
|
|
|
<html lang="en">
|
2022-09-26 18:15:13 -07:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
|
<title>Git Graphs Mermaid Quick Test Page</title>
|
|
|
|
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
|
|
|
|
<style>
|
|
|
|
div.mermaid {
|
|
|
|
/* font-family: 'trebuchet ms', verdana, arial; */
|
|
|
|
font-family: 'Courier New', Courier, monospace !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2022-10-02 13:51:25 -07:00
|
|
|
<h1>Git diagram demo</h1>
|
2022-09-26 18:15:13 -07:00
|
|
|
<pre class="mermaid">
|
2022-11-27 18:25:37 +00:00
|
|
|
---
|
2023-10-07 18:43:16 +01:00
|
|
|
title: Simple "branch and merge"
|
2022-11-27 18:25:37 +00:00
|
|
|
---
|
2022-09-26 18:15:13 -07:00
|
|
|
gitGraph:
|
|
|
|
commit
|
|
|
|
branch newbranch
|
|
|
|
checkout newbranch
|
|
|
|
commit
|
2023-10-07 18:43:16 +01:00
|
|
|
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
|
2022-09-26 18:15:13 -07:00
|
|
|
commit
|
2023-10-07 18:43:16 +01:00
|
|
|
checkout main
|
|
|
|
merge develop
|
|
|
|
</pre>
|
|
|
|
<pre class="mermaid">
|
|
|
|
---
|
|
|
|
title: Cherry-pick
|
|
|
|
---
|
|
|
|
gitGraph:
|
2022-09-26 18:15:13 -07:00
|
|
|
commit
|
2023-10-07 18:43:16 +01:00
|
|
|
branch newbranch
|
|
|
|
checkout newbranch
|
|
|
|
commit id: "Pick me"
|
|
|
|
checkout main
|
|
|
|
commit
|
|
|
|
checkout newbranch
|
2022-09-26 18:15:13 -07:00
|
|
|
commit
|
2023-10-07 18:43:16 +01:00
|
|
|
checkout main
|
|
|
|
cherry-pick id: "Pick me"
|
2022-09-26 18:15:13 -07:00
|
|
|
merge newbranch
|
|
|
|
</pre>
|
2023-10-07 18:43:16 +01:00
|
|
|
<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>
|
2022-09-26 18:15:13 -07:00
|
|
|
|
2023-02-19 14:03:11 +05:30
|
|
|
<script type="module">
|
|
|
|
import mermaid from './mermaid.esm.mjs';
|
2022-09-26 18:15:13 -07:00
|
|
|
const ALLOWED_TAGS = [
|
|
|
|
'a',
|
|
|
|
'b',
|
|
|
|
'blockquote',
|
|
|
|
'br',
|
|
|
|
'dd',
|
|
|
|
'div',
|
|
|
|
'dl',
|
|
|
|
'dt',
|
|
|
|
'em',
|
|
|
|
'foreignObject',
|
|
|
|
'h1',
|
|
|
|
'h2',
|
|
|
|
'h3',
|
|
|
|
'h4',
|
|
|
|
'h5',
|
|
|
|
'h6',
|
|
|
|
'h7',
|
|
|
|
'h8',
|
|
|
|
'hr',
|
|
|
|
'i',
|
|
|
|
'li',
|
|
|
|
'ul',
|
|
|
|
'ol',
|
|
|
|
'p',
|
|
|
|
'pre',
|
|
|
|
'span',
|
|
|
|
'strike',
|
|
|
|
'strong',
|
|
|
|
'table',
|
|
|
|
'tbody',
|
|
|
|
'td',
|
|
|
|
'tfoot',
|
|
|
|
'th',
|
|
|
|
'thead',
|
|
|
|
'tr',
|
|
|
|
];
|
|
|
|
mermaid.initialize({
|
|
|
|
theme: 'default',
|
|
|
|
// themeCSS: '.node rect { fill: red; }',
|
|
|
|
logLevel: 3,
|
|
|
|
securityLevel: 'loose',
|
|
|
|
flowchart: { curve: 'basis' },
|
|
|
|
gantt: { axisFormat: '%m/%d/%Y' },
|
|
|
|
sequence: { actorMargin: 50 },
|
|
|
|
dompurifyConfig: {
|
|
|
|
USE_PROFILES: {
|
|
|
|
svg: true,
|
|
|
|
},
|
|
|
|
ADD_TAGS: ALLOWED_TAGS,
|
|
|
|
ADD_ATTR: ['transform-origin'],
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|