{"id":19081,"date":"2024-11-19T10:47:32","date_gmt":"2024-11-19T02:47:32","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19081\/"},"modified":"2024-11-19T10:47:32","modified_gmt":"2024-11-19T02:47:32","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-mac-%e4%b8%8a%e5%ae%89%e8%a3%85%e5%b9%b6%e9%85%8d%e7%bd%ae-git-flow","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19081\/","title":{"rendered":"\u5982\u4f55\u5728 Mac \u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e Git Flow"},"content":{"rendered":"<p>git flow \u662f\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684 git \u64cd\u4f5c\u65b9\u5f0f\uff0c\u5b83\u901a\u8fc7\u5b9a\u4e49\u4e00\u4e9b\u5de5\u4f5c\u6d41\u7a0b\u548c\u5206\u652f\u7ba1\u7406\u89c4\u5219\uff0c\u6765\u4f18\u5316\u4ee3\u7801\u4ed3\u5e93\u7684\u7ba1\u7406\u548c\u56e2\u961f\u534f\u4f5c\uff0c\u51cf\u5c11\u9519\u8bef\u548c\u51b2\u7a81\uff0c\u63d0\u9ad8\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<p>\u867d\u7136 Git Flow \u770b\u8d77\u6765\u6bd4\u8f83\u590d\u6742\uff0c\u4f46\u5b9e\u9645\u4e0a\u5b83\u662f\u57fa\u4e8e Git \u7684\u5206\u652f\u64cd\u4f5c\u548c\u5408\u5e76\u673a\u5236\u4e4b\u4e0a\u7684\u4e00\u4e2a\u6613\u4e8e\u7406\u89e3\u548c\u4f7f\u7528\u7684\u5de5\u5177\u96c6\uff0c\u800c\u4e14\u5728\u5f00\u53d1\u56e2\u961f\u4e2d\u5df2\u88ab\u5e7f\u6cdb\u5e94\u7528\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Mac \u64cd\u4f5c\u7cfb\u7edf\uff0c\u90a3\u4e48\u4e0b\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 Mac \u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e Git Flow\u3002<\/p>\n<ol>\n<li>\u51c6\u5907\u5de5\u4f5c<\/li>\n<\/ol>\n<p>\u5728\u5f00\u59cb\u5b89\u88c5 Git Flow \u4e4b\u524d\uff0c\u4f60\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u51c6\u5907\u5de5\u4f5c\u3002<\/p>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5728 Mac \u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86 Git \u548c Homebrew\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e24\u4e2a\u547d\u4ee4\u884c\u6765\u5b89\u88c5\uff1a<\/p>\n<p>\/usr\/bin\/ruby -e &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&#8221;<\/p>\n<p>\u548c<\/p>\n<p>brew install git<\/p>\n<p>\u5176\u6b21\uff0c\u9700\u8981\u4f7f\u7528 Terminal \u7ec8\u7aef\u6765\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u786e\u5b9a\u5df2\u6253\u5f00 Terminal \u7ec8\u7aef\uff0c\u5e76\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1 Git \u548c Homebrew \u662f\u5426\u5df2\u5b89\u88c5\uff1a<\/p>\n<p>git &#8211;version<br \/>brew &#8211;version<\/p>\n<p>\u5982\u679c\u80fd\u663e\u793a\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<ol>\n<li>\u5b89\u88c5 Git Flow<\/li>\n<\/ol>\n<p>Git Flow \u7684\u5b89\u88c5\u53ef\u4ee5\u901a\u8fc7 Homebrew \u6765\u5feb\u901f\u5b8c\u6210\u3002<\/p>\n<p>\u5728 Terminal \u7ec8\u7aef\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n<p>brew install git-flow<\/p>\n<p>\u8fd9\u91cc\u7684 git-flow \u662f\u4e00\u4e2a\u5305\u542b Git Flow \u6240\u6709\u529f\u80fd\u7684 Bash \u811a\u672c\uff0c\u5b83\u4f1a\u5728 \/usr\/local\/bin \u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a git-flow \u547d\u4ee4\u3002<\/p>\n<ol>\n<li>\u914d\u7f6e Git Flow<\/li>\n<\/ol>\n<p>\u5b89\u88c5 Git Flow \u540e\uff0c\u9700\u8981\u5bf9\u5b83\u8fdb\u884c\u57fa\u672c\u914d\u7f6e\uff0c\u4ee5\u4fbf\u4e0e\u6211\u4eec\u7684 Git \u4ed3\u5e93\u914d\u5408\u4f7f\u7528\u3002<\/p>\n<p>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u914d\u7f6e\uff1a<\/p>\n<p>git flow init<\/p>\n<p>\u8fd9\u5c06\u5728\u4f60\u7684 Git \u4ed3\u5e93\u4e2d\u521b\u5efa\u4e24\u4e2a\u4e3b\u8981\u7684\u5206\u652f\uff1adevelop\uff08\u5f00\u53d1\u5206\u652f\uff09\u548c master\uff08\u7a33\u5b9a\u5206\u652f\uff09\u3002<\/p>\n<p>\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u6309\u7167 Git Flow \u7684\u64cd\u4f5c\u89c4\u5219\u6765\u521b\u5efa\u548c\u7ba1\u7406\u5176\u4ed6\u5206\u652f\uff0c\u6bd4\u5982 feature\u3001release\u3001hotfix \u548c support \u5206\u652f\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5728 ~\/.gitconfig \u914d\u7f6e\u6587\u4ef6\u4e2d\u52a0\u5165\u5982\u4e0b\u914d\u7f6e\u53c2\u6570\uff1a<\/p>\n<p>[gitflow &#8220;prefix&#8221;]<\/p>\n<pre>feature = feature\/\nrelease = release\/\nhotfix = hotfix\/\nsupport = support\/\nversiontag =<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u91cc\u8bbe\u7f6e\u4e86\u4e0d\u540c\u5206\u652f\u7684\u524d\u7f00\u548c\u7248\u672c\u53f7\u6807\u8bb0\uff0c\u4ee5\u65b9\u4fbf\u64cd\u4f5c\u548c\u7248\u672c\u63a7\u5236\u3002<\/p>\n<ol>\n<li>\u4f7f\u7528 Git Flow<\/li>\n<\/ol>\n<p>\u5b89\u88c5\u548c\u914d\u7f6e\u5b8c\u6bd5\u540e\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528 Git Flow \u4e86\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u529f\u80fd\u5206\u652f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>git flow feature start <\/p>\n<p>\u8fd9\u5c06\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u4ed3\u5e93\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 feature \u5206\u652f\uff0c\u5e76\u5c06\u5176\u4ece develop \u5206\u652f\u4e2d\u5206\u79bb\u51fa\u6765\uff0c\u53ef\u4ee5\u5728\u8fd9\u4e2a\u5206\u652f\u4e0a\u8fdb\u884c\u5f00\u53d1\u548c\u8c03\u8bd5\u3002<\/p>\n<p>\u5f53\u529f\u80fd\u5206\u652f\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5176\u5408\u5e76\u56de develop \u5206\u652f\uff1a<\/p>\n<p>git flow feature finish <\/p>\n<p>\u8fd9\u5c06\u4f1a\u5c06 feature \u5206\u652f\u7684\u6240\u6709\u66f4\u6539\u5408\u5e76\u5230 develop \u5206\u652f\u4e0a\uff0c\u5e76\u5c06\u5206\u652f\u5220\u9664\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u53c2\u6570\u548c\u9009\u9879\u6765\u8c03\u6574 Git Flow \u7684\u64cd\u4f5c\u65b9\u5f0f\u548c\u7b56\u7565\uff0c\u8be6\u7ec6\u4fe1\u606f\u53ef\u4ee5\u67e5\u770b Git Flow \u7684\u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728 Mac \u4e0a\u6210\u529f\u5b89\u88c5\u5e76\u914d\u7f6e Git Flow\uff0c\u8fd9\u5c06\u6709\u6548\u5730\u63d0\u9ad8\u4ee3\u7801\u7ba1\u7406\u548c\u56e2\u961f\u534f\u4f5c\u7684\u6548\u7387\u548c\u8d28\u91cf\u3002<\/p>\n<p>\u5f53\u7136\uff0cGit Flow \u53ea\u662f\u4e00\u79cd\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5982\u4f55\u4f7f\u7528\u548c\u8fd0\u7528\u5b83\uff0c\u8fd8\u9700\u8981\u6839\u636e\u56e2\u961f\u7684\u5177\u4f53\u60c5\u51b5\u548c\u9700\u6c42\u6765\u8fdb\u884c\u8c03\u6574\u548c\u8865\u5145\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728 Mac \u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e Git Flow\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>git flow \u662f\u4e00\u79cd\u975e\u5e38\u6d41\u884c\u7684 git \u64cd\u4f5c\u65b9\u5f0f\uff0c\u5b83\u901a\u8fc7\u5b9a\u4e49\u4e00\u4e9b\u5de5\u4f5c\u6d41\u7a0b\u548c\u5206\u652f\u7ba1\u7406\u89c4\u5219\uff0c\u6765\u4f18\u5316\u4ee3\u7801\u4ed3\u5e93\u7684\u7ba1\u7406\u548c\u56e2\u961f\u534f\u4f5c\uff0c\u51cf\u5c11\u9519\u8bef\u548c\u51b2\u7a81\uff0c\u63d0\u9ad8\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002 \u867d\u7136 Git Flow \u770b\u8d77\u6765\u6bd4\u8f83\u590d\u6742\uff0c\u4f46\u5b9e\u9645\u4e0a\u5b83\u662f\u57fa\u4e8e Git \u7684\u5206\u652f\u64cd\u4f5c\u548c\u5408\u5e76\u673a\u5236\u4e4b\u4e0a\u7684\u4e00\u4e2a\u6613\u4e8e\u7406\u89e3\u548c\u4f7f\u7528\u7684\u5de5\u5177\u96c6\uff0c\u800c\u4e14\u5728\u5f00\u53d1\u56e2\u961f\u4e2d\u5df2\u88ab\u5e7f\u6cdb\u5e94\u7528\u3002 \u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Mac \u64cd\u4f5c\u7cfb\u7edf\uff0c\u90a3\u4e48\u4e0b\u9762\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 Mac \u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e Git Flow\u3002 \u51c6\u5907\u5de5\u4f5c \u5728\u5f00\u59cb\u5b89\u88c5 Git Flow \u4e4b\u524d\uff0c\u4f60\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u51c6\u5907\u5de5\u4f5c\u3002 \u9996\u5148\uff0c\u4f60\u9700\u8981\u786e\u4fdd\u5728 Mac \u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86 Git \u548c Homebrew\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4e24\u4e2a\u547d\u4ee4\u884c\u6765\u5b89\u88c5\uff1a \/usr\/bin\/ruby -e &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)&#8221; \u548c brew install git \u5176\u6b21\uff0c\u9700\u8981\u4f7f\u7528 Terminal \u7ec8\u7aef\u6765\u6267\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u56e0\u6b64\u4f60\u9700\u8981\u786e\u5b9a\u5df2\u6253\u5f00 Terminal \u7ec8\u7aef\uff0c\u5e76\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1 Git \u548c Homebrew \u662f\u5426\u5df2\u5b89\u88c5\uff1a git &#8211;versionbrew &#8211;version \u5982\u679c\u80fd\u663e\u793a\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002 \u5b89\u88c5 Git Flow Git [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-19081","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=19081"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19081\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}