{"id":2072,"date":"2026-07-08T06:54:58","date_gmt":"2026-07-08T06:54:58","guid":{"rendered":"https:\/\/www.vpascode.com\/cn\/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\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","title":{"rendered":"Mermaid.js GitGraph \u56fe\u8868\u8bed\u6cd5\u6307\u5357"},"content":{"rendered":"<p>GitGraph \u56fe\u8868\u662f\u4e00\u79cd\u4e13\u95e8\u7684\u53ef\u89c6\u5316\u7ec4\u4ef6\uff0c\u7531\u5f00\u53d1\u8005\u3001DevOps \u56e2\u961f\u548c\u6280\u672f\u5199\u4f5c\u8005\u4f7f\u7528\uff0c\u4ee5\u6e05\u6670\u5730\u4f20\u8fbe Git \u5206\u652f\u7b56\u7565\u3001\u53d1\u5e03\u7ba1\u7406\u4ee5\u53ca\u5f00\u53d1\u5de5\u4f5c\u6d41\u7a0b\u3002\u8be5\u7ec4\u4ef6\u539f\u751f\u96c6\u6210\u4e8e Mermaid.js \u4e2d\uff0c<code>gitGraph<\/code>\u5f15\u64ce\u91c7\u7528\u58f0\u660e\u5f0f\u3001\u987a\u5e8f\u7684\u65f6\u95f4\u8f74\u6a21\u578b\u3002\u8fd9\u5c06\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u7ec8\u7aef\u547d\u4ee4\u76f4\u63a5\u6620\u5c04\u5230\u7cbe\u786e\u7684\u53ef\u89c6\u5316\u65f6\u95f4\u8f74\u56fe\u4e0a\uff0c\u800c\u65e0\u9700\u624b\u52a8\u56fe\u50cf\u7f16\u8f91\u3002<\/p>\n<h2>\u7406\u89e3 GitGraph \u65f6\u95f4\u8f74\u77e9\u9635<\/h2>\n<p>\u4e0e\u81ea\u7531\u5f62\u5f0f\u7684\u7cfb\u7edf\u6d41\u7a0b\u56fe\u4e0d\u540c\uff0cGitGraph \u56fe\u8868\u9075\u5faa\u4e25\u683c\u7684\u3001\u987a\u5e8f\u7684\u3001\u6309\u4e8b\u4ef6\u53d1\u751f\u987a\u5e8f\u7684\u903b\u8f91\uff0c\u7528\u4e8e\u5efa\u6a21\u771f\u5b9e\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u5de5\u4f5c\u533a\uff1a<\/p>\n<ul>\n<li><strong>\u81ea\u52a8\u6839\u5206\u652f\uff1a<\/strong> \u6bcf\u4e2a\u56fe\u8868\u5de5\u4f5c\u533a\u5728\u521d\u59cb\u5316\u65f6\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u4e3b\u6839\u65f6\u95f4\u8f74\u8f68\u9053\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u8f68\u9053\u547d\u540d\u4e3a<code>main<\/code>\uff0c\u5e76\u4e14\u6240\u6709\u540e\u7eed\u64cd\u4f5c\u90fd\u4ee5\u6b64\u4e3a\u57fa\u51c6\uff0c\u9664\u975e\u521b\u5efa\u4e86\u6e05\u6670\u7684\u66ff\u4ee3\u5206\u652f\u8def\u5f84\u3002<\/li>\n<li><strong>\u987a\u5e8f\u4f18\u5148\u7ea7\uff1a<\/strong> \u5143\u7d20\u6839\u636e\u4ee3\u7801\u6e90\u6587\u4ef6\u4e2d\u547d\u4ee4\u7684\u63d2\u5165\u987a\u5e8f\uff0c\u6cbf\u4ece\u5de6\u5230\u53f3\u7684\u65f6\u95f4\u8f74\u987a\u5e8f\u6e32\u67d3\u3002<\/li>\n<\/ul>\n<h2>\u57fa\u672c\u8bed\u6cd5\u7ed3\u6784<\/h2>\n<p>\u6bcf\u4e2a\u65f6\u95f4\u8f74\u90fd\u4ee5\u9a7c\u5cf0\u547d\u540d\u6cd5\u7684<code>gitGraph<\/code> \u58f0\u660e\u5173\u952e\u5b57\u5f00\u59cb\u3002\u5176\u540e\u662f\u6309\u987a\u5e8f\u5217\u51fa\u7684\u539f\u5b50\u6267\u884c\u547d\u4ee4\u5217\uff0c\u4f8b\u5982\u63d0\u4ea4\u3001\u68c0\u51fa\u548c\u5408\u5e76\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\u7f16\u8f91 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:eNpLzyxxL0osyODlUlBIzs\/NzSxBZSUVJeYlZyikpSaWlBal6ubkp2fmgVVkpCZn55eWYJFBmAJTk5sIkcpNLUpPRdUBAGUkKhg=\" \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  commit\r\n  commit\r\n  branch feature-login\r\n  checkout feature-login\r\n  commit\r\n  checkout main\r\n  merge feature-login<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxBZSUVJeYlZyikpSaWlBal6ubkp2fmgVVkpCZn55eWYJFBmAJTk5sIkcpNLUpPRdUBAGUkKhg=\" \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\u7f16\u8f91 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\u53c2\u8003<\/h2>\n<p>\u5e03\u5c40\u5f15\u64ce\u4f1a\u89e3\u6790\u7279\u5b9a\u7684\u5c0f\u5199\u64cd\u4f5c\u547d\u4ee4\uff0c\u4ee5\u63a8\u8fdb\u7ebf\u6761\u7c97\u7ec6\u3001\u62c6\u5206\u8f68\u9053\uff0c\u6216\u5728\u5de5\u4f5c\u533a\u753b\u5e03\u4e0a\u5408\u5e76\u7aef\u70b9\u3002<\/p>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n<thead>\n<tr>\n<th>Git \u547d\u4ee4\u6807\u8bb0<\/th>\n<th>\u53c2\u6570\u53c2\u6570\u4fee\u9970\u7b26<\/th>\n<th>\u6280\u672f\u64cd\u4f5c\u4e0e\u5e03\u5c40\u884c\u4e3a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>commit<\/code><\/td>\n<td><code>id: \"hash\"<\/code>, <code>type: TYPE<\/code>, <code>\u6807\u7b7e\uff1a\"v1.0\"<\/code><\/td>\n<td>\u5c06\u4e00\u4e2a\u65b0\u7684\u91cc\u7a0b\u7891\u8282\u70b9\u76f4\u63a5\u9644\u52a0\u5230\u5f53\u524d\u76ee\u6807\u5206\u652f\u8def\u5f84\u7ebf\u4e0a\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u5206\u652f<\/code><\/td>\n<td><code>\u540d\u79f0<\/code>, <code>\u987a\u5e8f\uff1a\u6574\u6570<\/code><\/td>\n<td>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5206\u652f\u8f66\u9053\u5206\u88c2\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u53ef\u9009\u7684\u663e\u5f0f<code>\u987a\u5e8f<\/code>\u503c\u6765\u5f3a\u5236\u5176\u5782\u76f4\u5806\u53e0\u4f4d\u7f6e\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u68c0\u51fa<\/code> \/ <code>\u5207\u6362<\/code><\/td>\n<td><code>\u5206\u652f\u540d\u79f0<\/code><\/td>\n<td>\u5c06\u6d3b\u52a8\u5f55\u5236\u7d22\u5f15\u6307\u9488\u79fb\u81f3\u6307\u5b9a\u7684\u76ee\u6807\u5206\u652f\u7ebf\u3002\u540e\u7eed\u64cd\u4f5c\u5c06\u4ee5\u6b64\u8f66\u9053\u4e3a\u57fa\u51c6\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u5408\u5e76<\/code><\/td>\n<td><code>\u76ee\u6807\u5206\u652f\u540d\u79f0<\/code>, <code>ID\uff1a\"\u54c8\u5e0c\"<\/code>, <code>\u6807\u7b7e\uff1a\"v2\"<\/code><\/td>\n<td>\u5c06\u6307\u5b9a\u7684\u5206\u652f\u8f66\u9053\u5408\u5e76\u56de\u5f53\u524d\u5206\u652f\uff0c\u521b\u5efa\u4e00\u4e2a\u660e\u663e\u7684\u89c6\u89c9\u878d\u5408\u4ea4\u53c9\u70b9\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>\u6311\u9009\u63d0\u4ea4<\/code><\/td>\n<td><code>ID\uff1a\"\u63d0\u4ea4\u54c8\u5e0c\"<\/code>, <code>\u7236\u63d0\u4ea4\uff1a\"\u7236\u54c8\u5e0c\"<\/code><\/td>\n<td>\u5c06\u5916\u90e8\u5206\u652f\u4e2d\u7684\u7279\u5b9a\u63d0\u4ea4\u590d\u5236\u5230\u5f53\u524d\u5206\u652f\u8f66\u9053\u4e0a\uff0c\u800c\u4e0d\u878d\u5408\u8f66\u9053\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2>\u9ad8\u7ea7\u529f\u80fd\uff1a\u63d0\u4ea4\u7c7b\u578b\u4e0e\u6807\u7b7e\u81ea\u5b9a\u4e49<\/h2>\n<p>\u4e3a\u4e86\u533a\u5206\u5e38\u89c4\u8865\u4e01\u3001\u7cfb\u7edf\u56de\u6eda\u6216\u91cd\u5927\u53d1\u5e03\uff0c\u60a8\u53ef\u4ee5\u5206\u914d\u4e00\u4e2a\u663e\u5f0f\u7684<code>\u7c7b\u578b<\/code>\u548c<code>\u6807\u7b7e<\/code>\u4f7f\u7528\u7c7b\u4f3c JSON \u7684\u952e\u503c\u5bf9\u5c5e\u6027\u7684\u53c2\u6570\u5757\u5185\u7684\u5b57\u7b26\u4e32\u4fee\u9970\u7b26\u3002<\/p>\n<h3>\u652f\u6301\u7684\u63d0\u4ea4\u5f62\u72b6\u5206\u7c7b\uff1a<\/h3>\n<ul>\n<li><code>\u7c7b\u578b\uff1a\u5e38\u89c4<\/code>\uff1a\u9ed8\u8ba4\u914d\u7f6e\u3002\u6cbf\u65f6\u95f4\u8f74\u8f66\u9053\u6e32\u67d3\u4e3a\u4e00\u4e2a\u5b9e\u5fc3\u586b\u5145\u7684\u5706\u5f62\u5355\u5143\u8282\u70b9\u3002<\/li>\n<li><code>\u7c7b\u578b\uff1a\u53cd\u8f6c<\/code>\uff1a\u7a81\u51fa\u663e\u793a\u67b6\u6784\u6216\u7a0b\u5e8f\u4e0a\u7684\u56de\u6eda\u3002\u6e32\u67d3\u4e3a\u4e00\u4e2a\u5e26\u4ea4\u53c9\u7ebf\u7684\u5b9e\u5fc3\u5706\u5f62\u5355\u5143\u8282\u70b9\uff08$X$\uff09\u3002<\/li>\n<li><code>\u7c7b\u578b\uff1a\u9ad8\u4eae<\/code>\uff1a\u5f15\u8d77\u5bf9\u5173\u952e\u7ed3\u6784\u6027\u66f4\u6539\u6216\u5b89\u5168\u4fee\u590d\u7684\u5173\u6ce8\u3002\u6e32\u67d3\u4e3a\u4e00\u4e2a\u62c9\u957f\u7684\u5b9e\u5fc3\u77e9\u5f62\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\u7f16\u8f91 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:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlB62jH36fJuJSThksqCVCsFD093Dx8gDoEqW9f5tHXF8+a1T\/ave7qkV0mhJDEdKFxmqGegZ4ipO8g1zDUo2BWqd\/a8Z7tnPe2a\/6J5r26EEgDHZzTj\" \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  commit id: \"\u521d\u59cb\"\r\n  commit type: HIGHLIGHT id: \"\u5b89\u5168\u70ed\u4fee\u590d\" tag: \"v1.0.1\"\r\n  commit type: REVERSE id: \"\u56de\u6eda\u529f\u80fd-X\"<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlB62jH36fJuJSThksqCVCsFD093Dx8gDoEqW9f5tHXF8+a1T\/ave7qkV0mhJDEdKFxmqGegZ4ipO8g1zDUo2BWqd\/a8Z7tnPe2a\/6J5r26EEgDHZzTj\" \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\u7f16\u8f91 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>\u9ad8\u7ea7\u529f\u80fd\uff1a\u6311\u9009\uff08cherry-pick\uff09\u903b\u8f91\u4e0e\u4e25\u683c\u7ea6\u675f<\/h2>\n<p>\u8be5<code>cherry-pick<\/code>\u547d\u4ee4\u5c06\u4ece\u53e6\u4e00\u6761\u5206\u652f\u8f66\u9053\u4e2d\u590d\u5236\u4e00\u4e2a\u7279\u5b9a\u7684\u5b64\u7acb\u8282\u70b9\u5230\u60a8\u5f53\u524d\u6fc0\u6d3b\u7684\u5206\u652f\u4e0a\u3002\u4e3a\u907f\u514d\u5f15\u53d1\u7f16\u8bd1\u5668\u5e03\u5c40\u9519\u8bef\uff0c\u6267\u884c cherry-pick \u64cd\u4f5c\u65f6\u5fc5\u987b\u9075\u5faa\u4ee5\u4e0b\u4e25\u683c\u7684\u5de5\u4f5c\u533a\u9a8c\u8bc1\u8981\u6c42\uff1a<\/p>\n<ul>\n<li><strong>\u6392\u9664\u7ea6\u675f\uff1a<\/strong> \u60a8\u8981\u6311\u9009\u7684\u76ee\u6807\u63d0\u4ea4 ID *\u4e0d\u5f97* \u5df2\u5b58\u5728\u4e8e\u60a8\u5f53\u524d\u8ddf\u8e2a\u7684\u5206\u652f\u8f66\u9053\u4e0a\u3002<\/li>\n<li><strong>\u524d\u7f6e\u5386\u53f2\u8981\u6c42\uff1a<\/strong> \u5f53\u524d\u6fc0\u6d3b\u7684\u5206\u652f\u7ebf\u5728\u8c03\u7528\u6311\u9009\u64cd\u4f5c\u4e4b\u524d\uff0c\u5fc5\u987b\u81f3\u5c11\u5305\u542b\u4e00\u4e2a\u6709\u6548\u7684\u63d0\u4ea4\u8282\u70b9\u3002<\/li>\n<li><strong>\u5408\u5e76\u7236\u8282\u70b9\u8981\u6c42\uff1a<\/strong> \u5982\u679c\u60a8\u6b63\u5728\u6311\u9009\u4e00\u4e2a\u5408\u5e76\u8282\u70b9\uff0c\u5fc5\u987b\u663e\u5f0f\u5730\u4f7f\u7528\u4ee5\u4e0b\u4fee\u9970\u7b26\u5757\u4f20\u9012\u76f4\u63a5\u4e0a\u6e38\u7236\u8282\u70b9\u7684\u6807\u8bc6\u5b57\u7b26\u4e32\uff1a<code>parent: \"hash\"<\/code> \u4fee\u9970\u7b26\u5757\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\u7f16\u8f91 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:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlB6sW7f873rlEDCSUWJeckZCsUliemZeelghRmpydn5pSUoYkian3bNf9G898XCpU92NCqhaMhNzMzDUD1\/1\/Nd+2HqiooqdQsyk7OxmAQAbbdC\/w==\" \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  commit id: \"\u8bbe\u7f6e\"\r\n  branch staging\r\n  checkout staging\r\n  commit id: \"\u529f\u80fd\u8865\u4e01\"\r\n  checkout main\r\n  commit id: \"\u57fa\u7ebf\"\r\n  cherry-pick id: \"\u529f\u80fd\u8865\u4e01\"<\/code><\/pre>                <\/div>\r\n                <div class=\"vpascode-actions\">\r\n                    <a href=\"https:\/\/www.vpascode.com\/editor\/#mermaid:eNpLzyxxL0osyODlUlBIzs\/NzSxRyEyxUlB6sW7f873rlEDCSUWJeckZCsUliemZeelghRmpydn5pSUoYkian3bNf9G898XCpU92NCqhaMhNzMzDUD1\/1\/Nd+2HqiooqdQsyk7OxmAQAbbdC\/w==\" \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\u7f16\u8f91 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>\u9ad8\u7ea7\u529f\u80fd\uff1a\u524d\u7aef\u5143\u6570\u636e\u53c2\u6570\u914d\u7f6e<\/h2>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u56fe\u8868\u811a\u672c\u7684\u7edd\u5bf9\u9876\u90e8\u58f0\u660e\u4e00\u4e2a\u914d\u7f6e\u6307\u4ee4\u5757\uff0c\u6765\u5fae\u8c03\u5168\u5c40\u89c6\u89c9\u884c\u4e3a\uff08\u4f8b\u5982\u5207\u6362\u5206\u652f\u6807\u7b7e\u3001\u4fee\u6539\u884c\u7d22\u5f15\u6216\u5806\u53e0\u65f6\u95f4\u8f74\uff09<code>%%{init: { 'logLevel': 'debug', 'theme': 'default' , 'config': { 'gitGraph': { ... } } } }%%<\/code> \u914d\u7f6e\u6307\u4ee4\u5757<\/p>\n<h3>\u53ef\u914d\u7f6e\u53c2\u6570\u77e9\u9635<\/h3>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n<thead>\n<tr>\n<th>\u914d\u7f6e\u952e\u5b57\u7b26\u4e32<\/th>\n<th>\u7c7b\u578b\u5b9a\u4e49<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u89c6\u89c9\u754c\u9762\u66f4\u6539\u7ed3\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>showBranches<\/code><\/td>\n<td>\u5e03\u5c14\u503c<\/td>\n<td><code>true<\/code><\/td>\n<td>\u5207\u6362\u753b\u5e03\u7f51\u683c\u5de6\u4fa7\u5404\u4e2a\u5206\u652f\u8ddf\u8e2a\u6807\u7b7e\u7684\u53ef\u89c1\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>showCommitLabel<\/code><\/td>\n<td>\u5e03\u5c14\u503c<\/td>\n<td><code>true<\/code><\/td>\n<td>\u5207\u6362\u5728\u5404\u4e2a\u65f6\u95f4\u8f74\u8282\u70b9\u4e0a\u65b9\u76f4\u63a5\u6e32\u67d3\u6587\u672c\u6807\u9898\u548c\u5b57\u6bcd\u6570\u5b57\u54c8\u5e0c\u503c\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>mainBranchName<\/code><\/td>\n<td>\u5b57\u7b26\u4e32<\/td>\n<td><code>\"main\"<\/code><\/td>\n<td>\u66f4\u6539\u9ed8\u8ba4\u8d77\u59cb\u6839\u5206\u652f\u540d\u79f0\u8ddf\u8e2a\u6587\u672c\uff08\u4f8b\u5982\uff0c\u5207\u6362\u4e3a<code>\"master\"<\/code> \u6216 <code>\"trunk\"<\/code>).<\/td>\n<\/tr>\n<tr>\n<td><code>mainBranchOrder<\/code><\/td>\n<td>\u6574\u6570<\/td>\n<td><code>0<\/code><\/td>\n<td>\u8bbe\u7f6e\u4e3b\u6839\u65f6\u95f4\u8f74\u8ddf\u8e2a\u901a\u9053\u7684\u4ece\u4e0a\u5230\u4e0b\u7684\u5782\u76f4\u5806\u53e0\u987a\u5e8f\u4f4d\u7f6e\u7d22\u5f15\u3002<\/td>\n<\/tr>\n<tr>\n<td><code>parallelCommits<\/code><\/td>\n<td>\u5e03\u5c14\u503c<\/td>\n<td><code>false<\/code><\/td>\n<td>\u5982\u679c\u4fee\u6539\u4e3a<code>true<\/code>\uff0c\u5171\u4eab\u76f8\u540c\u7236\u7ea7\u6b65\u9aa4\u8ddd\u79bb\u7684\u72ec\u7acb\u63d0\u4ea4\u5c06\u5728\u540c\u4e00\u5782\u76f4\u5c42\u7ea7\u4e0a\u5bf9\u79f0\u5bf9\u9f50\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr\/>\n<h2>\u73b0\u5b9e\u4e16\u754c\u84dd\u56fe\uff1a\u4f01\u4e1a\u7ea7 Git-Flow \u53d1\u5e03\u7ba1\u7406\u6d41\u6c34\u7ebf<\/h2>\n<p>\u8fd9\u4e2a\u5168\u9762\u7684\u4f01\u4e1a\u84dd\u56fe\u5c55\u793a\u4e86\u6807\u51c6\u7684\u751f\u4ea7\u53d1\u5e03\u6d41\u6c34\u7ebf\u3002\u5b83\u8986\u76d6\u4e86\u914d\u7f6e\u53c2\u6570\uff0c\u5c06\u6839\u8f66\u9053\u91cd\u547d\u540d\u4e3a<code>trunk<\/code>\uff0c\u5efa\u7acb\u56fa\u5b9a\u7684\u5206\u652f\u987a\u5e8f\u5c42\u7ea7\uff0c\u4f7f\u7528\u591a\u4e2a\u5206\u652f\u8f66\u9053\uff08<code>develop<\/code>\u548c<code>feature-auth<\/code>\uff09\uff0c\u6267\u884c\u5408\u5e76\u64cd\u4f5c\uff0c\u5e94\u7528\u81ea\u5b9a\u4e49\u6807\u7b7e\uff0c\u5e76\u90e8\u7f72\u9ad8\u4f18\u5148\u7ea7\u7684\u9ad8\u4eae\u63d0\u4ea4\u5f62\u72b6\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\u7f16\u8f91 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\u7f16\u8f91 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\u89c1\u8bed\u6cd5\u9677\u9631\u4e0e\u7cfb\u7edf\u9650\u5236<\/h2>\n<p>\u5728\u7f16\u8bd1\u7cbe\u786e\u7684\u7248\u672c\u63a7\u5236\u56fe\u65f6\uff0c\u8bf7\u7262\u8bb0\u8fd9\u4e9b\u6545\u969c\u6392\u9664\u53c2\u6570\uff0c\u4ee5\u9632\u6b62\u5e03\u5c40\u8ba1\u7b97\u9519\u8bef\uff1a<\/p>\n<ul>\n<li><strong>\u5927\u5c0f\u5199\u654f\u611f\u6027\u9519\u8bef\uff1a<\/strong> \u4e3b\u8981\u7684\u521d\u59cb\u5316\u58f0\u660e\u5fc5\u987b\u660e\u786e\u4ee5\u9a7c\u5cf0\u547d\u540d\u6cd5\u4e66\u5199\u4e3a<code>gitGraph<\/code>\u3002\u5168\u90e8\u5c0f\u5199\u4e66\u5199\u4e3a<code>gitgraph<\/code>\u5c06\u5bfc\u81f4\u7f16\u8bd1\u5668\u89e3\u6790\u5d29\u6e83\u3002<\/li>\n<li><strong>\u672a\u52a0\u5f15\u53f7\u7684\u5b57\u6bcd\u6570\u5b57\u6807\u8bc6\u7b26\uff1a<\/strong> \u5728\u4f20\u9012\u81ea\u5b9a\u4e49\u63d0\u4ea4\u53c2\u6570\u65f6\uff08\u4f8b\u5982\uff0c<code>id: core_init<\/code>\uff09\uff0c\u5305\u542b\u8fde\u5b57\u7b26\u3001\u7a7a\u683c\u6216\u53e5\u70b9\u7684\u503c\u5fc5\u987b\u7528\u53cc\u5f15\u53f7\u62ec\u8d77\u6765\u3002\u5fd8\u8bb0\u4f7f\u7528\u5f15\u53f7\u5757\u5c06\u5bfc\u81f4\u9a8c\u8bc1\u7f16\u8bd1\u9519\u8bef\u3002<\/li>\n<li><strong>\u65e0\u6548\u7684\u68c0\u51fa\u76ee\u6807\uff1a<\/strong> \u8c03\u7528\u4e00\u4e2a<code>\u68c0\u51fa\u5206\u652f_name<\/code> \u5bf9\u4e00\u4e2a\u672a\u4e8b\u5148\u4f7f\u7528\u4ee5\u4e0b\u65b9\u5f0f\u521d\u59cb\u5316\u7684\u5b57\u7b26\u4e32\u6807\u8bc6\u7b26\u6267\u884c\u64cd\u4f5c<code>\u5206\u652f branch_name<\/code> \u547d\u4ee4\u5c06\u7acb\u5373\u4e2d\u65ad\u56fe\u6784\u5efa\u3002<\/li>\n<li><strong>\u5206\u652f\u6392\u5e8f\u51b2\u7a81\uff1a<\/strong> \u5f53\u4f7f\u7528<code>\u987a\u5e8f<\/code> \u5206\u652f\u4e0a\u7684\u914d\u7f6e\u6807\u7b7e\u65f6\uff0c\u786e\u4fdd\u591a\u4e2a\u8f68\u9053\u4e0d\u4f1a\u6620\u5c04\u5230\u76f8\u540c\u7684\u6574\u6570\uff0c\u9664\u975e\u60a8\u5e0c\u671b\u753b\u5e03\u8def\u5f84\u8f68\u8ff9\u91cd\u53e0\u3002\u8bf7\u4fdd\u6301\u5206\u652f\u8f68\u9053\u7f16\u53f7\u7684\u552f\u4e00\u6027\u3002<\/li>\n<li><strong>\u7a7a\u683c\u5206\u9694\u5931\u8d25\uff1a<\/strong> \u5728\u62ec\u53f7\u53c2\u6570\u77e9\u9635\u5185\u5206\u9694\u5c5e\u6027\u65f6\uff0c\u786e\u4fdd\u6e05\u6670\u7684\u53c2\u6570\u7a7a\u683c\u5b58\u5728\uff08\u4f8b\u5982\u4f7f\u7528<code>id: \"1\", type: HIGHLIGHT<\/code>\uff09\u3002\u7701\u7565\u7f3a\u5931\u7684\u9017\u53f7\u6216\u7a7a\u683c\u53ef\u80fd\u5bfc\u81f4\u89e3\u6790\u5f02\u5e38\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>GitGraph \u56fe\u8868\u662f\u4e00\u79cd\u4e13\u95e8\u7684\u53ef\u89c6\u5316\u7ec4\u4ef6\uff0c\u7531\u5f00\u53d1\u8005\u3001DevOps \u56e2\u961f\u548c\u6280\u672f&#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-2072","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\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\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\/cn\/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=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\",\"name\":\"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/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\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/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\\\/cn\\\/docs\\\/vpascode-docs\\\/mermaid-js-gitgraph-diagram-syntax-guide\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lean Docs\",\"item\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/docs\\\/%ld_collection%\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Mermaid.js GitGraph \u56fe\u8868\u8bed\u6cd5\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#website\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/\",\"name\":\"VPasCode\",\"description\":\"by Visual Paradigm\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#organization\",\"name\":\"VPasCode\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"contentUrl\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/wp-content\\\/uploads\\\/sites\\\/3\\\/2026\\\/06\\\/cropped-vp-online-logo-v1.png\",\"width\":128,\"height\":138,\"caption\":\"VPasCode\"},\"image\":{\"@id\":\"https:\\\/\\\/www.vpascode.com\\\/cn\\\/#\\\/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\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","og_locale":"zh_CN","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\/cn\/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":{"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vpascode.com\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","url":"https:\/\/www.vpascode.com\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/","name":"Mermaid GitGraph Syntax | VPasCode Text to Diagram Guide","isPartOf":{"@id":"https:\/\/www.vpascode.com\/cn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vpascode.com\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#primaryimage"},"image":{"@id":"https:\/\/www.vpascode.com\/cn\/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\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vpascode.com\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.vpascode.com\/cn\/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\/cn\/docs\/vpascode-docs\/mermaid-js-gitgraph-diagram-syntax-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vpascode.com\/cn\/"},{"@type":"ListItem","position":2,"name":"Lean Docs","item":"https:\/\/www.vpascode.com\/cn\/docs\/%ld_collection%\/"},{"@type":"ListItem","position":3,"name":"Mermaid.js GitGraph \u56fe\u8868\u8bed\u6cd5\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.vpascode.com\/cn\/#website","url":"https:\/\/www.vpascode.com\/cn\/","name":"VPasCode","description":"by Visual Paradigm","publisher":{"@id":"https:\/\/www.vpascode.com\/cn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vpascode.com\/cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.vpascode.com\/cn\/#organization","name":"VPasCode","url":"https:\/\/www.vpascode.com\/cn\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.vpascode.com\/cn\/#\/schema\/logo\/image\/","url":"https:\/\/www.vpascode.com\/cn\/wp-content\/uploads\/sites\/3\/2026\/06\/cropped-vp-online-logo-v1.png","contentUrl":"https:\/\/www.vpascode.com\/cn\/wp-content\/uploads\/sites\/3\/2026\/06\/cropped-vp-online-logo-v1.png","width":128,"height":138,"caption":"VPasCode"},"image":{"@id":"https:\/\/www.vpascode.com\/cn\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/ld_docs\/2072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/ld_docs"}],"about":[{"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/types\/ld_docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/users\/3"}],"wp:attachment":[{"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/media?parent=2072"}],"wp:term":[{"taxonomy":"ld_collection","embeddable":true,"href":"https:\/\/www.vpascode.com\/cn\/wp-json\/wp\/v2\/ld_collection?post=2072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}