{"id":2087,"date":"2026-07-08T06:54:58","date_gmt":"2026-07-08T06:54:58","guid":{"rendered":"https:\/\/www.vpascode.com\/tw\/docs\/uncategorized\/mermaid-js-gitgraph-diagram-syntax-guide\/"},"modified":"2026-07-08T06:54:58","modified_gmt":"2026-07-08T06:54:58","slug":"mermaid-js-gitgraph-diagram-syntax-guide","status":"publish","type":"ld_docs","link":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","title":{"rendered":"Mermaid.js GitGraph \u5716\u8868\u8a9e\u6cd5\u6307\u5357"},"content":{"rendered":"<p>GitGraph \u5716\u8868\u662f\u4e00\u7a2e\u5c08\u7528\u7684\u53ef\u8996\u5316\u7d44\u4ef6\uff0c\u7531\u958b\u767c\u4eba\u54e1\u3001DevOps \u5718\u968a\u548c\u6280\u672f\u64b0\u7a3f\u4eba\u4f7f\u7528\uff0c\u4ee5\u6e05\u6670\u5730\u50b3\u9054 Git \u5206\u652f\u7b56\u7565\u3001\u767c\u884c\u7ba1\u7406\u4ee5\u53ca\u958b\u767c\u5de5\u4f5c\u6d41\u7a0b\u3002\u5167\u5efa\u65bc Mermaid.js \u4e2d\uff0c<code>gitGraph<\/code>\u5f15\u64ce\u4f7f\u7528\u8072\u660e\u5f0f\u3001\u9806\u5e8f\u6027\u7684\u6642\u9593\u8ef8\u6a21\u578b\u3002\u9019\u53ef\u5c07\u73fe\u5be6\u4e16\u754c\u4e2d\u7684\u7d42\u7aef\u547d\u4ee4\u76f4\u63a5\u6620\u5c04\u5230\u7cbe\u78ba\u7684\u8996\u89ba\u6642\u9593\u8ef8\u5730\u5716\u4e0a\uff0c\u7121\u9700\u624b\u52d5\u7de8\u8f2f\u5716\u50cf\u3002<\/p>\n<h2>\u7406\u89e3 GitGraph \u6642\u9593\u8ef8\u77e9\u9663<\/h2>\n<p>\u8207\u81ea\u7531\u5f62\u5f0f\u7684\u7cfb\u7d71\u6d41\u7a0b\u5716\u4e0d\u540c\uff0cGitGraph \u5716\u8868\u9075\u5faa\u56b4\u683c\u7684\u3001\u9806\u5e8f\u7684\u3001\u6309\u767c\u751f\u9806\u5e8f\u7684\u908f\u8f2f\uff0c\u7528\u4ee5\u6a21\u64ec\u771f\u5be6\u7684\u7248\u672c\u63a7\u5236\u5de5\u4f5c\u5340\uff1a<\/p>\n<ul>\n<li><strong>\u81ea\u52d5\u6839\u5206\u652f\uff1a<\/strong> \u6bcf\u500b\u5716\u8868\u5de5\u4f5c\u5340\u5728\u521d\u59cb\u5316\u6642\u6703\u81ea\u52d5\u555f\u52d5\u4e00\u500b\u4e3b\u8981\u7684\u6839\u6642\u9593\u8ef8\u8ecc\u9053\u3002\u9810\u8a2d\u60c5\u6cc1\u4e0b\uff0c\u6b64\u8ecc\u9053\u547d\u540d\u70ba<code>main<\/code>\uff0c\u4e14\u6240\u6709\u5f8c\u7e8c\u64cd\u4f5c\u90fd\u5c07\u8ffd\u8e64\u6b64\u8ecc\u9053\uff0c\u9664\u975e\u5275\u5efa\u4e86\u6e05\u6670\u7684\u66ff\u4ee3\u5206\u652f\u8def\u5f91\u3002<\/li>\n<li><strong>\u9806\u5e8f\u512a\u5148\u7d1a\uff1a<\/strong> \u5143\u7d20\u6839\u64da\u4ee3\u78bc\u4f86\u6e90\u6a94\u6848\u4e2d\u547d\u4ee4\u7684\u63d2\u5165\u9806\u5e8f\uff0c\u6cbf\u8457\u5f9e\u5de6\u5230\u53f3\u7684\u6642\u9593\u8ef8\u9806\u5e8f\u6e32\u67d3\u3002<\/li>\n<\/ul>\n<h2>\u57fa\u672c\u8a9e\u6cd5\u7d50\u69cb<\/h2>\n<p>\u6bcf\u500b\u6642\u9593\u8ef8\u90fd\u4ee5\u99dd\u5cf0\u5f0f<code>gitGraph<\/code>\u5ba3\u544a\u95dc\u9375\u5b57\u958b\u59cb\u3002\u5176\u5f8c\u662f\u6309\u9806\u5e8f\u6392\u5217\u7684\u539f\u5b50\u57f7\u884c\u547d\u4ee4\u5217\u8868\uff0c\u4f8b\u5982\u63d0\u4ea4\u3001\u5207\u63db\u548c\u5408\u4f75\u3002<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxBZSUVJeYlZyikpSaWlBal6ubkp2fmgVVkpCZn55eWYJFBmAJTk5sIkcpNLUpPRdUBAGUkKhg=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lqKynHW3PpqxXSEtNLCktStXNyU\/PzIOItz\/rn\/20YwOmFLJmmKLcRKi2CR1P9m5F1QMAgMc42Q==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">gitGraph\r\n  \u63d0\u4ea4\r\n  \u63d0\u4ea4\r\n  \u5206\u652f feature-login\r\n  \u5207\u63db\u5230 feature-login\r\n  \u63d0\u4ea4\r\n  \u5207\u63db\u5230 main\r\n  \u5408\u4f75 feature-login<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lqKynHW3PpqxXSEtNLCktStXNyU\/PzIOItz\/rn\/20YwOmFLJmmKLcRKi2CR1P9m5F1QMAgMc42Q==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxBZSUVJeYlZyikpSaWlBal6ubkp2fmgVVkpCZn55eWYJFBmAJTk5sIkcpNLUpPRdUBAGUkKhg=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"mqewxqb\"><img fetchpriority=\"high\" alt=\"\" class=\"alignnone size-full wp-image-986\" decoding=\"async\" fetchpriority=\"high\" height=\"171\" sizes=\"(max-width: 362px) 100vw, 362px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png 362w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505-300x142.png 300w\" width=\"362\"\/><\/p>\n<h2>\u5b8c\u6574\u7684 Git \u64cd\u4f5c\u547d\u4ee4\u53c3\u8003<\/h2>\n<p>\u4f48\u5c40\u5f15\u64ce\u6703\u89e3\u6790\u7279\u5b9a\u7684\u5c0f\u5beb\u64cd\u4f5c\u547d\u4ee4\uff0c\u4ee5\u63a8\u9032\u7dda\u689d\u7c97\u7d30\u3001\u5206\u5272\u8ecc\u9053\uff0c\u6216\u5728\u5de5\u4f5c\u5340\u756b\u5e03\u4e0a\u878d\u5408\u7aef\u9ede\u3002<\/p>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n<thead>\n<tr>\n<th>Git \u547d\u4ee4\u6a19\u8a18<\/th>\n<th>\u53c3\u6578\u5f15\u6578\u4fee\u98fe\u7b26<\/th>\n<th>\u6280\u8853\u64cd\u4f5c\u8207\u4f48\u5c40\u884c\u70ba<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>\u63d0\u4ea4<\/code><\/td>\n<td><code>id: \"hash\"<\/code>, <code>\u985e\u578b: TYPE<\/code>, <code>\u6a19\u7c64\uff1a\"v1.0\"<\/code><\/td>\n<td>\u5c07\u65b0\u7684\u91cc\u7a0b\u7891\u7bc0\u9ede\u76f4\u63a5\u9644\u52a0\u5230\u6d3b\u8e8d\u76ee\u6a19\u5206\u652f\u8def\u5f91\u7dda\u4e0a\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u5206\u652f<\/code><\/td>\n<td><code>\u540d\u7a31<\/code>, <code>\u9806\u5e8f\uff1a\u6574\u6578<\/code><\/td>\n<td>\u5efa\u7acb\u65b0\u7684\u5206\u652f\u901a\u9053\u5206\u5272\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u53ef\u9078\u7684\u660e\u78ba\u8a2d\u5b9a\u5f37\u5236\u5176\u5782\u76f4\u5806\u758a\u4f4d\u7f6e\u3002<code>\u9806\u5e8f<\/code>\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u5207\u63db<\/code> \/ <code>\u5207\u63db<\/code><\/td>\n<td><code>\u5206\u652f\u540d\u7a31<\/code><\/td>\n<td>\u5c07\u6d3b\u8e8d\u7684\u9304\u88fd\u7d22\u5f15\u6307\u91dd\u79fb\u52d5\u5230\u6307\u5b9a\u7684\u76ee\u6a19\u5206\u652f\u7dda\u4e0a\u3002\u5f8c\u7e8c\u64cd\u4f5c\u5c07\u4ee5\u6b64\u901a\u9053\u70ba\u8ffd\u8e64\u5c0d\u8c61\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u5408\u4f75<\/code><\/td>\n<td><code>\u76ee\u6a19\u5206\u652f\u540d\u7a31<\/code>, <code>ID\uff1a\"\u96dc\u6e4a\"<\/code>, <code>\u6a19\u7c64\uff1a\"v2\"<\/code><\/td>\n<td>\u5c07\u6307\u5b9a\u7684\u5206\u652f\u901a\u9053\u5408\u4f75\u56de\u76ee\u524d\u5206\u652f\uff0c\u5275\u9020\u51fa\u660e\u986f\u7684\u8996\u89ba\u878d\u5408\u4ea4\u53c9\u9ede\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u6311\u9078<\/code><\/td>\n<td><code>ID\uff1a\"\u63d0\u4ea4\u96dc\u6e4a\"<\/code>, <code>\u7236\u7bc0\u9ede\uff1a\"\u7236\u96dc\u6e4a\"<\/code><\/td>\n<td>\u5c07\u5916\u90e8\u5206\u652f\u4e2d\u7684\u7279\u5b9a\u63d0\u4ea4\u8907\u88fd\u5230\u76ee\u524d\u5206\u652f\u901a\u9053\u4e0a\uff0c\u800c\u4e0d\u878d\u5408\u901a\u9053\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2>\u9032\u968e\u529f\u80fd\uff1a\u63d0\u4ea4\u985e\u578b\u8207\u6a19\u7c64\u81ea\u8a02<\/h2>\n<p>\u70ba\u4e86\u5340\u5206\u4e00\u822c\u4fee\u88dc\u3001\u7cfb\u7d71\u56de\u6efe\u6216\u91cd\u5927\u767c\u884c\uff0c\u60a8\u53ef\u4ee5\u6307\u5b9a\u660e\u78ba\u7684<code>\u985e\u578b<\/code>\u4ee5\u53ca<code>\u6a19\u7c64<\/code>\u4f7f\u7528\u985e\u4f3c JSON \u7684\u9375\u503c\u5c6c\u6027\uff0c\u5728\u53c3\u6578\u5340\u584a\u5167\u7684\u5b57\u4e32\u4fee\u98fe\u7b26\u3002<\/p>\n<h3>\u652f\u63f4\u7684\u63d0\u4ea4\u5f62\u72c0\u5206\u985e\uff1a<\/h3>\n<ul>\n<li><code>\u985e\u578b\uff1a\u6b63\u5e38<\/code>\uff1a\u9810\u8a2d\u8a2d\u5b9a\u3002\u6cbf\u6642\u9593\u8ef8\u8ecc\u9053\u986f\u793a\u70ba\u586b\u6eff\u7684\u5be6\u5fc3\u5713\u5f62\u7bc0\u9ede\u3002<\/li>\n<li><code>\u985e\u578b\uff1a\u53cd\u5411<\/code>\uff1a\u5f37\u8abf\u67b6\u69cb\u6216\u7a0b\u5f0f\u78bc\u5c64\u9762\u7684\u56de\u6efe\u3002\u986f\u793a\u70ba\u4ea4\u53c9\u7684\u5be6\u5fc3\u5713\u5f62\u7bc0\u9ede\uff08$X$\uff09\u3002<\/li>\n<li><code>\u985e\u578b\uff1a\u5f37\u8abf<\/code>\uff1a\u63d0\u9192\u6ce8\u610f\u95dc\u9375\u7684\u7d50\u69cb\u6027\u8b8a\u66f4\u6216\u5b89\u5168\u4fee\u5fa9\u3002\u986f\u793a\u70ba\u62c9\u9577\u7684\u586b\u6eff\u77e9\u5f62\u65b9\u6846\u3002<\/li>\n<\/ul>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlDyzMssyUzMUUISL6ksSLVS8PB09\/AB4hCIuuDU5NKizJJKXY\/8krTMCiWFksR0oHCZoZ6BniGm7iDXMNegYFeI3qD8nJykxORsXbfUxJLSolTdCCUAgoUsaw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lCpkp7\/fMUnraMffp8m4lJPGXC+c9ndcNlHu6Z\/uLVfth6tZ1Pm1d8bxt45P9614snqOk8GzFzOcbl4Ckygz1DPQMsRvR3\/t0wkSYEbPnPdu972nX\/BfNe3UjlADsRlHm\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">gitGraph\r\n  \u63d0\u4ea4 id\uff1a\"\u521d\u59cb\"\r\n  \u63d0\u4ea4 \u985e\u578b\uff1a\u5f37\u8abf id\uff1a\"\u5b89\u5168\u71b1\u4fee\u88dc\" \u6a19\u7c64\uff1a\"v1.0.1\"\r\n  \u63d0\u4ea4 \u985e\u578b\uff1a\u53cd\u5411 id\uff1a\"\u56de\u6efe\u529f\u80fd-X\"<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lCpkp7\/fMUnraMffp8m4lJPGXC+c9ndcNlHu6Z\/uLVfth6tZ1Pm1d8bxt45P9614snqOk8GzFzOcbl4Ckygz1DPQMsRvR3\/t0wkSYEbPnPdu972nX\/BfNe3UjlADsRlHm\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlDyzMssyUzMUUISL6ksSLVS8PB09\/AB4hCIuuDU5NKizJJKXY\/8krTMCiWFksR0oHCZoZ6BniGm7iDXMNegYFeI3qD8nJykxORsXbfUxJLSolTdCCUAgoUsaw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"vzjmfCC\"><img alt=\"\" class=\"alignnone size-full wp-image-987\" decoding=\"async\" height=\"126\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4d52fc30.png\" width=\"254\"\/><\/p>\n<hr\/>\n<h2>\u9032\u968e\u529f\u80fd\uff1a\u6311\u9078\u908f\u8f2f\u8207\u56b4\u683c\u9650\u5236<\/h2>\n<p>\u8a72<code>\u6311\u9078<\/code>\u6307\u4ee4\u6703\u5c07\u4f86\u81ea\u4e0d\u540c\u5206\u652f\u8ecc\u9053\u7684\u7279\u5b9a\u5b64\u7acb\u7bc0\u9ede\u8907\u88fd\u5230\u60a8\u76ee\u524d\u6d3b\u8e8d\u7684\u5206\u652f\u4e0a\u3002\u70ba\u907f\u514d\u89f8\u767c\u7de8\u8b6f\u5668\u4f48\u5c40\u932f\u8aa4\uff0c\u57f7\u884c\u6311\u9078\u6642\u5fc5\u9808\u9075\u5faa\u4ee5\u4e0b\u56b4\u683c\u7684\u5de5\u4f5c\u5340\u9a57\u8b49\u8981\u6c42\uff1a<\/p>\n<ul>\n<li><strong>\u6392\u9664\u9650\u5236\uff1a<\/strong> \u60a8\u8981\u6311\u9078\u7684\u76ee\u6a19\u63d0\u4ea4 ID *\u4e0d\u5f97* \u5df2\u5b58\u5728\u65bc\u60a8\u76ee\u524d\u8ffd\u8e64\u7684\u5206\u652f\u8ecc\u9053\u4e0a\u3002<\/li>\n<li><strong>\u524d\u7f6e\u6b77\u53f2\uff1a<\/strong> \u76ee\u524d\u6d3b\u8e8d\u7684\u5206\u652f\u7dda\u5728\u57f7\u884c\u6311\u9078\u52d5\u4f5c\u4e4b\u524d\uff0c\u5fc5\u9808\u81f3\u5c11\u5305\u542b\u4e00\u500b\u6709\u6548\u7684\u63d0\u4ea4\u7bc0\u9ede\u3002<\/li>\n<li><strong>\u5408\u4f75\u7236\u7bc0\u9ede\u8981\u6c42\uff1a<\/strong> \u5982\u679c\u60a8\u8981\u6311\u9078\u5408\u4f75\u7bc0\u9ede\uff0c\u5fc5\u9808\u660e\u78ba\u5730\u4f7f\u7528<code>\u7236\u7bc0\u9ede\uff1a\"\u96dc\u6e4a\"<\/code>\u4fee\u98fe\u5340\u584a\u50b3\u905e\u5373\u6642\u76f4\u63a5\u4e0a\u6e38\u7236\u7bc0\u9ede\u8b58\u5225\u5b57\u4e32\u3002<\/li>\n<\/ul>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNptjMEJgDAMAP+CO4T+XcAFnCPG2AZtLWn6cHtREFT8HnfnxQbFHNoGgLYYxUCmHlxhq9mddFRMFKAYekn+8gLTslV7sUc7M1pV7jIaBfcqIkr66iMWXiXxbaruXRZa\/mYHSY04fw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lCpkp7\/fMUnqxYu3TdbOUQOJPO9qeTVmvUFySmJ6Zlw4RaX\/WP\/tF+2ZkQRTtT7vmv2je+2T\/uheL5yihaslNzMzDVD9\/1\/PtEOue9Ux82bgDmzkAJ9xW7Q==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">gitGraph\r\n  \u63d0\u4ea4 id\uff1a\"\u8a2d\u5b9a\"\r\n  \u5206\u652f staging\r\n  \u5207\u63db\u81f3 staging\r\n  \u63d0\u4ea4 id\uff1a\"\u529f\u80fd\u4fee\u88dc\"\r\n  \u5207\u63db\u81f3 main\r\n  \u63d0\u4ea4 id\uff1a\"\u57fa\u7dda\"\r\n  \u6311\u9078 id\uff1a\"\u529f\u80fd\u4fee\u88dc\"<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlB41j\/hya4lCpkp7\/fMUnqxYu3TdbOUQOJPO9qeTVmvUFySmJ6Zlw4RaX\/WP\/tF+2ZkQRTtT7vmv2je+2T\/uheL5yihaslNzMzDVD9\/1\/PtEOue9Ux82bgDmzkAJ9xW7Q==\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNptjMEJgDAMAP+CO4T+XcAFnCPG2AZtLWn6cHtREFT8HnfnxQbFHNoGgLYYxUCmHlxhq9mddFRMFKAYekn+8gLTslV7sUc7M1pV7jIaBfcqIkr66iMWXiXxbaruXRZa\/mYHSY04fw==\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"UbdLRrX\"><img alt=\"\" class=\"alignnone size-full wp-image-988\" decoding=\"async\" height=\"200\" sizes=\"(max-width: 341px) 100vw, 341px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4df30fa1.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4df30fa1.png 341w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4df30fa1-300x176.png 300w\" width=\"341\"\/><\/p>\n<hr\/>\n<h2>\u9032\u968e\u529f\u80fd\uff1a\u524d\u7f6e\u6b04\u4f4d\u53c3\u6578\u8a2d\u5b9a<\/h2>\n<p>\u60a8\u53ef\u4ee5\u900f\u904e\u5728\u5716\u8868\u8173\u672c\u7684\u7d55\u5c0d\u9802\u7aef\u5ba3\u544a\u4e00\u500b\u914d\u7f6e\u6307\u4ee4\u5340\u584a\uff0c\u4f86\u5fae\u8abf\u5168\u57df\u8996\u89ba\u884c\u70ba\uff08\u4f8b\u5982\u5207\u63db\u5206\u652f\u6a19\u7c64\u3001\u4fee\u6539\u5217\u7d22\u5f15\u6216\u5806\u758a\u6642\u9593\u8ef8\uff09\u3002<code>%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'config': { 'gitGraph': { ... } } } }%%<\/code> \u914d\u7f6e\u6307\u4ee4\u5340\u584a\u4f4d\u65bc\u60a8\u7684\u5716\u8868\u8173\u672c\u7684\u7d55\u5c0d\u9802\u7aef\u3002<\/p>\n<h3>\u53ef\u914d\u7f6e\u53c3\u6578\u77e9\u9663<\/h3>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n<thead>\n<tr>\n<th>\u914d\u7f6e\u91d1\u9470\u5b57\u4e32<\/th>\n<th>\u985e\u578b\u5b9a\u7fa9<\/th>\n<th>\u9810\u8a2d\u503c<\/th>\n<th>\u8996\u89ba\u4ecb\u9762\u8b8a\u66f4\u7d50\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>showBranches<\/code><\/td>\n<td>\u5e03\u6797\u503c<\/td>\n<td><code>true<\/code><\/td>\n<td>\u5207\u63db\u756b\u5e03\u7db2\u683c\u5de6\u5074\u500b\u5225\u5206\u652f\u8ffd\u8e64\u6a19\u7c64\u7684\u53ef\u898b\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>showCommitLabel<\/code><\/td>\n<td>\u5e03\u6797\u503c<\/td>\n<td><code>true<\/code><\/td>\n<td>\u5207\u63db\u5728\u500b\u5225\u6642\u9593\u8ef8\u7bc0\u9ede\u4e0a\u65b9\u76f4\u63a5\u6e32\u67d3\u6587\u5b57\u6a19\u984c\u8207\u5b57\u6bcd\u6578\u5b57\u96dc\u6e4a\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>mainBranchName<\/code><\/td>\n<td>\u5b57\u4e32<\/td>\n<td><code>\"main\"<\/code><\/td>\n<td>\u8b8a\u66f4\u9810\u8a2d\u8d77\u59cb\u6839\u5206\u652f\u540d\u7a31\u8ffd\u8e64\u6587\u5b57\uff08\u4f8b\u5982\u5207\u63db\u70ba<code>\"master\"<\/code> \u6216 <code>\"trunk\"<\/code>).<\/td>\n<\/tr>\n<tr>\n<td><code>mainBranchOrder<\/code><\/td>\n<td>\u6574\u6578<\/td>\n<td><code>0<\/code><\/td>\n<td>\u8a2d\u5b9a\u4e3b\u8981\u6839\u6642\u9593\u8ef8\u8ffd\u8e64\u8ecc\u9053\u7684\u81ea\u4e0a\u800c\u4e0b\u5782\u76f4\u5806\u758a\u9806\u5e8f\u4f4d\u7f6e\u7d22\u5f15\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>parallelCommits<\/code><\/td>\n<td>\u5e03\u6797\u503c<\/td>\n<td><code>\u932f\u8aa4<\/code><\/td>\n<td>\u5982\u679c\u4fee\u6539\u70ba<code>\u6b63\u78ba<\/code>\uff0c\u5171\u4eab\u76f8\u540c\u7236\u7d1a\u6b65\u9a5f\u8ddd\u96e2\u7684\u7368\u7acb\u63d0\u4ea4\u5c07\u5728\u540c\u4e00\u5782\u76f4\u5c64\u7d1a\u4e0a\u5c0d\u7a31\u5c0d\u9f4a\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2>\u73fe\u5be6\u4e16\u754c\u85cd\u5716\uff1a\u4f01\u696d\u7d1a Git-Flow \u767c\u5e03\u7ba1\u7406\u6d41\u7a0b<\/h2>\n<p>\u6b64\u5168\u9762\u7684\u4f01\u696d\u85cd\u5716\u5c55\u793a\u4e86\u6a19\u6e96\u7684\u751f\u7522\u767c\u4f48\u6d41\u7a0b\u3002\u5b83\u8986\u84cb\u4e86\u914d\u7f6e\u53c3\u6578\uff0c\u5c07\u6839\u8def\u5f91\u91cd\u547d\u540d\u70ba<code>trunk<\/code>\uff0c\u5efa\u7acb\u56fa\u5b9a\u7684\u5206\u652f\u9806\u5e8f\u5c64\u7d1a\uff0c\u4f7f\u7528\u591a\u500b\u5206\u652f\u8def\u5f91\uff08<code>develop<\/code>\u548c<code>feature-auth<\/code>\uff09\uff0c\u57f7\u884c\u5408\u4f75\u64cd\u4f5c\uff0c\u5957\u7528\u81ea\u8a02\u6a19\u7c64\uff0c\u4e26\u90e8\u7f72\u9ad8\u512a\u5148\u7d1a\u7684\u5f37\u8abf\u63d0\u4ea4\u5f62\u72c0\u3002<\/p>\n<div class=\"vpascode-viewer-container vpascode-fancy-active\">\n<div class=\"vpascode-header\">\n<span class=\"vpascode-lang-label\">Mermaid<\/span><br \/>\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UcFqwzAMvRf6DyIQcplLu2NuTWBtRjbGVthZTbTENI6Nq3SMsn+f62Vb0jCMD3pPek9+DsOzbCXHcIaokryxaOrIVwplm1hsi\/oRFTksYtu1h+gGomOt31OtlOQc99Q4zlEEn5cThvPZj9B8BlD4PpBlDEHmnCQ2ItWWAmCsHHZaLZaLZXDd+kLcGZFmntj7NaCkEzXa+NaaioPueIQNx42VLYuVSPBIQ403Qu4sCey4HglNiIHa\/etO5LqSxWTNh7t1zwB\/GIphm222ubu7\/7ZUZCsaufVKF1ysXT0xSYjRZaaMbKgMRsL+S\/5ke5\/vsWdqyL1ePFld\/qZ969P+AuwTnQ0=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 8px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<div class=\"vpascode-code-wrapper\">\n            <div class=\"vpascode-viewer-container vpascode-fancy-active\">\r\n                                <div class=\"vpascode-header\">\r\n                    <span class=\"vpascode-lang-label\">Mermaid<\/span>\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UcFqwzAMvRf6DyIQcplLu2NuTWBtRjbGVthZTbTENI6Nq3SMsn+f62Vb0jCMD3pPek9+DsOzbCXHcIaokryxaOrIVwplm1hsi\/oRFTksYtu1h+gGomOt31OtlOQc99Q4zlEEn5cThvPZj9B8BlD4PpBlDEHmnCQ2ItWWAmCsHHZaLZaLZXDd+kLcGZFmntj7NaCkEzXa+NaaioPueIQNx42VLYuVSPBIQ403Qu4sCey4HglNiIHa\/etO5LqSxWTNh7t1zwB\/GIphm222ubu7\/7ZUZCsaufVKF1ysXT0xSYjRZaaMbKgMRsL+S\/5ke5\/vsWdqyL1ePFld\/qZ969P+AuwTnQ0=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 8px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n                                <div class=\"vpascode-code-wrapper\">\r\n                    <pre class=\"lang-mermaid\"><code class=\"language-mermaid\" data-language=\"mermaid\" class=\"language-mermaid\">%%{init: { 'gitGraph': { 'mainBranchName': 'trunk', 'showCommitLabel': true } } }%%\r\ngitGraph\r\n  commit id: \"Initial-Core\" tag: \"v1.0.0\"\r\n  commit id: \"Setup-CI\"\r\n  branch develop\r\n  checkout develop\r\n  commit id: \"Sprint-1-Base\"\r\n  branch feature-auth\r\n  checkout feature-auth\r\n  commit id: \"JWT-Logic\"\r\n  commit id: \"MFA-Logic\" type: HIGHLIGHT\r\n  checkout develop\r\n  merge feature-auth id: \"Merge-Auth\"\r\n  commit id: \"Beta-Compiled\"\r\n  checkout trunk\r\n  merge develop id: \"Release-Prod\" tag: \"v2.0.0\"<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UcFqwzAMvRf6DyIQcplLu2NuTWBtRjbGVthZTbTENI6Nq3SMsn+f62Vb0jCMD3pPek9+DsOzbCXHcIaokryxaOrIVwplm1hsi\/oRFTksYtu1h+gGomOt31OtlOQc99Q4zlEEn5cThvPZj9B8BlD4PpBlDEHmnCQ2ItWWAmCsHHZaLZaLZXDd+kLcGZFmntj7NaCkEzXa+NaaioPueIQNx42VLYuVSPBIQ403Qu4sCey4HglNiIHa\/etO5LqSxWTNh7t1zwB\/GIphm222ubu7\/7ZUZCsaufVKF1ysXT0xSYjRZaaMbKgMRsL+S\/5ke5\/vsWdqyL1ePFld\/qZ969P+AuwTnQ0=\" \r\n                       target=\"_blank\" \r\n                       rel=\"noopener noreferrer\" \r\n                       class=\"vpascode-fancy-btn\">\r\n                        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" style=\"margin-right: 6px;\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg>\r\n                        <span>Edit Mermaid in VPasCode<\/span>\r\n                    <\/a>\r\n                <\/div>\r\n            <\/div>\r\n            \n<\/p><\/div>\n<div class=\"vpascode-actions\">\n<a class=\"vpascode-fancy-btn\" href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNp1UcFqwzAMvRf6DyIQcplLu2NuTWBtRjbGVthZTbTENI6Nq3SMsn+f62Vb0jCMD3pPek9+DsOzbCXHcIaokryxaOrIVwplm1hsi\/oRFTksYtu1h+gGomOt31OtlOQc99Q4zlEEn5cThvPZj9B8BlD4PpBlDEHmnCQ2ItWWAmCsHHZaLZaLZXDd+kLcGZFmntj7NaCkEzXa+NaaioPueIQNx42VLYuVSPBIQ403Qu4sCey4HglNiIHa\/etO5LqSxWTNh7t1zwB\/GIphm222ubu7\/7ZUZCsaufVKF1ysXT0xSYjRZaaMbKgMRsL+S\/5ke5\/vsWdqyL1ePFld\/qZ969P+AuwTnQ0=\" rel=\"noopener noreferrer\" target=\"_blank\"><br \/>\n<svg fill=\"none\" height=\"14\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.5\" style=\"margin-right: 6px;\" viewbox=\"0 0 24 24\" width=\"14\"><path d=\"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7\"><\/path><path d=\"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z\"><\/path><\/svg><br \/>\n<span>\u5728 VPasCode \u4e2d\u7de8\u8f2f Mermaid<\/span><br \/>\n<\/a>\n<\/div>\n<\/div>\n<p id=\"iKSnpYj\"><img loading=\"lazy\" alt=\"\" class=\"alignnone size-full wp-image-989\" decoding=\"async\" height=\"278\" loading=\"lazy\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" src=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df610e5bf8.png\" srcset=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df610e5bf8.png 560w, https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df610e5bf8-300x149.png 300w\" width=\"560\"\/><\/p>\n<hr\/>\n<h2>\u5e38\u898b\u8a9e\u6cd5\u9677\u9631\u8207\u7cfb\u7d71\u9650\u5236<\/h2>\n<p>\u5728\u7de8\u8b6f\u7cbe\u78ba\u7684\u7248\u672c\u63a7\u5236\u5716\u5f62\u6642\uff0c\u8acb\u8a18\u4f4f\u9019\u4e9b\u6545\u969c\u6392\u9664\u53c3\u6578\uff0c\u4ee5\u907f\u514d\u4f48\u5c40\u8a08\u7b97\u932f\u8aa4\uff1a<\/p>\n<ul>\n<li><strong>\u5927\u5c0f\u5beb\u654f\u611f\u932f\u8aa4\uff1a<\/strong> \u4e3b\u8981\u7684\u521d\u59cb\u5316\u5ba3\u544a\u5fc5\u9808\u4ee5\u660e\u78ba\u7684\u99dd\u5cf0\u5f0f\u5927\u5c0f\u5beb\u66f8\u5beb\u70ba<code>gitGraph<\/code>\u3002\u4ee5\u5168\u5c0f\u5beb\u66f8\u5beb\u70ba<code>gitgraph<\/code>\u5c07\u89f8\u767c\u7de8\u8b6f\u5668\u89e3\u6790\u932f\u8aa4\u3002<\/li>\n<li><strong>\u672a\u52a0\u5f15\u865f\u7684\u5b57\u6bcd\u6578\u5b57\u8b58\u5225\u7b26\uff1a<\/strong> \u5728\u50b3\u905e\u81ea\u8a02\u63d0\u4ea4\u53c3\u6578\u6642\uff08\u4f8b\u5982\uff0c<code>id: core_init<\/code>\uff09\uff0c\u5305\u542b\u9023\u5b57\u7b26\u3001\u7a7a\u683c\u6216\u53e5\u9ede\u7684\u503c\u5fc5\u9808\u7528\u96d9\u5f15\u865f\u5305\u570d\u3002\u907a\u6f0f\u5f15\u865f\u5340\u584a\u5c07\u5c0e\u81f4\u9a57\u8b49\u7de8\u8b6f\u932f\u8aa4\u3002<\/li>\n<li><strong>\u7121\u6548\u7684\u5207\u63db\u76ee\u6a19\uff1a<\/strong> \u547c\u53eb<code>\u5207\u63db\u5230\u5206\u652f branch_name<\/code> \u5c0d\u4e00\u500b\u672a\u4e8b\u5148\u4f7f\u7528\u300c\u300d\u521d\u59cb\u5316\u7684\u5b57\u4e32\u8b58\u5225\u78bc\u57f7\u884c\u52d5\u4f5c<code>\u5206\u652f branch_name<\/code> \u6307\u4ee4\u6703\u7acb\u5373\u4e2d\u65b7\u5716\u5f62\u5efa\u7acb\u3002<\/li>\n<li><strong>\u5206\u652f\u6392\u5e8f\u885d\u7a81\uff1a<\/strong> \u7576\u4f7f\u7528<code>\u6392\u5e8f<\/code> \u5206\u652f\u4e0a\u7684\u914d\u7f6e\u6a19\u7c64\u6642\uff0c\u8acb\u78ba\u4fdd\u591a\u500b\u8ecc\u9053\u4e0d\u6703\u88ab\u6620\u5c04\u5230\u76f8\u540c\u7684\u6574\u6578\uff0c\u9664\u975e\u60a8\u5e0c\u671b\u756b\u5e03\u8def\u5f91\u75d5\u8de1\u91cd\u758a\u3002\u8acb\u4fdd\u6301\u5206\u652f\u8ecc\u9053\u7de8\u865f\u7684\u552f\u4e00\u6027\u3002<\/li>\n<li><strong>\u7a7a\u683c\u5206\u9694\u5931\u6557\uff1a<\/strong> \u7576\u5728\u62ec\u865f\u53c3\u6578\u77e9\u9663\u5167\u5206\u96e2\u5c6c\u6027\u6642\uff0c\u8acb\u78ba\u4fdd\u660e\u78ba\u7684\u53c3\u6578\u7a7a\u683c\u5b58\u5728\uff08\u4f8b\u5982\u4f7f\u7528<code>id: \"1\", type: HIGHLIGHT<\/code>\uff09\u3002\u907a\u6f0f\u9017\u865f\u6216\u7a7a\u683c\u53ef\u80fd\u5c0e\u81f4\u89e3\u6790\u7570\u5e38\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>GitGraph \u5716\u8868\u662f\u4e00\u7a2e\u5c08\u7528\u7684\u53ef\u8996\u5316\u7d44\u4ef6\uff0c\u7531\u958b\u767c\u4eba\u54e1\u3001DevOps \u5718\u968a\u548c\u6280&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":25,"template":"","meta":{"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"ld_collection":[14],"class_list":["post-2087","ld_docs","type-ld_docs","status-publish","hentry","ld_collection-vpascode-docs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide<\/title>\n<meta name=\"description\" content=\"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide\" \/>\n<meta property=\"og:description\" content=\"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"VPasCode\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\",\"name\":\"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4df4c81a505.png\",\"datePublished\":\"2026-07-08T06:54:58+00:00\",\"description\":\"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4df4c81a505.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/img_6a4df4c81a505.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mermaid.js GitGraph \u5716\u8868\u8a9e\u6cd5\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/tw\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide","description":"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","og_locale":"zh_TW","og_type":"article","og_title":"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide","og_description":"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.","og_url":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","og_site_name":"VPasCode","og_image":[{"url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u9810\u4f30\u95b1\u8b80\u6642\u9593":"5 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","url":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","name":"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png","datePublished":"2026-07-08T06:54:58+00:00","description":"Visualize Git branching, merging, and commit histories using Mermaid GitGraph in VPasCode, a free diagram-as-code tool.","breadcrumb":{"@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#primaryimage","url":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png","contentUrl":"https:\/\/www.vpascode.com\/wp-content\/uploads\/2026\/07\/img_6a4df4c81a505.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vpascode.com\/tw\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/tw\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/tw\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Mermaid.js GitGraph \u5716\u8868\u8a9e\u6cd5\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/tw\/#website","url":"https:\/\/www.vpascode.com\/tw\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/tw\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/tw\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/tw\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.vpascode.com\/tw\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/tw\/wp-content\/uploads\/sites\/2\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/tw\/wp-content\/uploads\/sites\/2\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/tw\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_docs\/2087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/users\/3"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/media?parent=2087"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/tw\/wp-json\/wp\/v2\/ld_collection?post=2087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}