{"id":26391,"date":"2022-11-17T09:38:31","date_gmt":"2022-11-17T01:38:31","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=26391"},"modified":"2022-11-17T09:38:39","modified_gmt":"2022-11-17T01:38:39","slug":"eleven-rule-gitlab","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/eleven-rule-gitlab.html","title":{"rendered":"\u6d45\u6790GitLab Flow\u7684\u5341\u4e00\u4e2a\u89c4\u5219"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4f7f\u7528 Git \u7248\u672c\u63a7\u5236\uff0c\u662f\u5bf9\u4f7f\u7528\u5b83\u4e4b\u524d\u7684\u6240\u6709\u7248\u672c\u63a7\u5236\u65b9\u5f0f\u7684\u4e00\u79cd\u6539\u8fdb\u3002\u7136\u800c\uff0c\u5f88\u591a\u7ec4\u7ec7\u6700\u7ec8\u4ee5\u592a\u8fc7\u6df7\u4e71\u6216\u8fc7\u4e8e\u590d\u6742\u7684\u6d41\u7a0b\u6765\u7ed3\u675f\u3002\u8fd9\u4e2a\u95ee\u9898\u5bf9\u4e8e\u521a\u4ece\u5176\u4ed6\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u8f6c\u8fc7\u6765\u7684\u7ec4\u7ec7\u6765\u8bf4\u7279\u522b\u7a81\u51fa\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\u6d45\u6790GitLab<\/p>\n

\u5728\u672c\u6587\u4e2d\u6211\u4eec\u4f1a\u5217\u51fa GitLab \u5de5\u4f5c\u6d41 \u768411\u6761\u89c4\u5219\uff0c\u4ee5\u5e2e\u52a9\u7b80\u5316\u3001\u6574\u7406\u5de5\u4f5c\u6d41\u7a0b\u3002\u8fd9\u4e9b\u89c4\u5219\u6700\u4e3b\u8981\u7684\u76ca\u5904\u662f(\u6216\u6211\u4eec\u5e0c\u671b\u662f) \u5b83\u80fd\u591f\u7b80\u5316\u6d41\u7a0b\u5e76\u4e14\u4ea7\u751f\u4e00\u4e2a\u66f4\u9ad8\u6548\u548c\u66f4\u6e05\u695a\u7684\u6210\u679c\u3002<\/p>\n

\u6211\u4eec\u8ba4\u4e3a\u603b\u4f1a\u6709\u53ef\u6539\u5584\u7684\u7a7a\u95f4\uff0c\u5e76\u4e14\u6bcf\u4e00\u6b21\u6539\u5584\u90fd\u662f\u8349\u6848\u3002\u4e00\u5982\u65e2\u5f80\uff0c\u6bcf\u4e2a\u4eba\u90fd\u53ef\u4ee5\u505a\u51fa\u8d21\u732e!\u53cd\u9988\u548c\u63d0\u610f\u89c1\u662f\u975e\u5e38\u53d7\u6b22\u8fce\u7684\u3002<\/p>\n

1. \u4f7f\u7528\u529f\u80fd\u5206\u652f\uff0c\u4e0d\u76f4\u63a5\u63d0\u4ea4\u5230master<\/strong><\/div>\n

\u5982\u679c\u4f60\u4ece SVN\u8fc7\u6765\uff0c\u4f8b\u5982\uff0c\u4f60\u5c06\u4e60\u60ef\u4e8e\u57fa\u4e8etrunk\u7684\u5de5\u4f5c\u6d41\u3002\u5f53\u4f7f\u7528Git\u7684\u65f6\u5019\uff0c\u4f60\u5e94\u8be5\u4e3a\u4f60\u505a\u7684\u4efb\u4f55\u4e8b\u60c5\u521b\u5efa\u4e00\u4e2a\u5206\u652f\uff0c\u4ee5\u4fbf\u4f60\u4ee5merge\u524d\u7684\u4ee3\u7801\u8bc4\u5ba1\u4f5c\u4e3a\u7ed3\u675f\u3002<\/p>\n

2. \u6d4b\u8bd5\u6240\u6709\u7684\u63d0\u4ea4\uff0c\u4e0d\u4ec5\u4ec5\u662fmaster\u4e0a\u7684\u63d0\u4ea4<\/strong><\/div>\n

\u4e00\u4e9b\u4eba\u8bbe\u7f6e\u4ed6\u4eec\u7684CI\u4ec5\u4ec5\u6d4b\u8bd5\u90a3\u4e9b\u88ab\u5408\u5e76\u5230master\u7684\u63d0\u4ea4\u3002\u8fd9\u592a\u8fdf\u4e86;\u5bf9\u4e8emaster\u603b\u662f\u7eff\u8272\u7684\u6d4b\u8bd5\u4eba\u4eec\u5e94\u611f\u5230\u6709\u4fe1\u5fc3\u3002\u5bf9\u4eba\u4eec\u6765\u8bf4\u5728\u4ed6\u4eec\u5f00\u59cb\u5f00\u53d1\u65b0\u529f\u80fd\u524d\u4e0d\u5f97\u4e0d\u6d4b\u8bd5master\u662f\u6ca1\u6709\u610f\u4e49\u7684\uff0c\u4f8b\u5982\uff0cCI\u4e0d\u662f\u5f88\u6602\u8d35\uff0c\u6240\u4ee5\u6309\u8fd9\u79cd\u65b9\u5f0f\u505a\u624d\u6709\u610f\u4e49\u3002<\/p>\n

3. \u5728\u6240\u6709\u7684\u63d0\u4ea4\u4e0a\u8fd0\u884c\u6240\u6709\u7684\u6d4b\u8bd5(\u5982\u679c\u8fd0\u884c\u6d4b\u8bd5\u591a\u4e8e5\u5206\u949f\uff0c\u5e76\u884c\u8fd0\u884c\u5b83\u4eec)<\/strong><\/div>\n

\u5982\u679c\u4f60\u5de5\u4f5c\u5728\u4e00\u4e2a\u7279\u6027\u5206\u652f\u5e76\u6dfb\u52a0\u65b0\u63d0\u4ea4,\u7136\u540e\u5728\u90a3\u4e2a\u5206\u652f\u8fd0\u884c\u6d4b\u8bd5\u3002\u5982\u679c\u6d4b\u8bd5\u82b1\u8d39\u8f83\u957f\u65f6\u95f4\uff0c\u8bd5\u7740\u5e76\u884c\u7684\u8fd0\u884c\u5b83\u4eec\u3002\u5728\u670d\u52a1\u7aef\u7684\u5408\u5e76\u8bf7\u6c42\u8fd0\u884c\u6240\u6709\u7684\u6d4b\u8bd5\u5957\u4ef6\u3002\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u670d\u52a1\u4e8e\u5f00\u53d1\u7684\u6d4b\u8bd5\u5957\u4ef6\uff0c\u53e6\u4e00\u4e2a\u4ec5\u4ec5\u662f\u5bf9\u65b0\u7248\u672c\u7684\uff0c\u90a3\u4e48\u503c\u5f97\u8bbe\u7f6e\u5e76\u884c\u6d4b\u8bd5\uff0c\u5206\u522b\u8fd0\u884c\u5b83\u4eec\u3002<\/p>\n

4. \u5728\u5408\u5e76\u5230master\u524d\u6267\u884c\u4ee3\u7801\u8bc4\u5ba1\uff0c\u800c\u975e\u4e8b\u540e<\/strong><\/div>\n

\u4e0d\u8981\u5728\u4e00\u5468\u7ed3\u675f\u7684\u65f6\u5019\u6d4b\u8bd5\u6240\u6709\u7684\u4e1c\u897f\u3002 \u5f53\u573a\u505a,\u56e0\u4e3a\u4f60\u4f1a\u66f4\u5bb9\u6613\u6293\u4f4f\u53ef\u80fd\u5bfc\u81f4\u95ee\u9898\u7684\u4e8b\u60c5\uff0c\u5176\u4ed6\u4eba\u4e5f\u4f1a\u52aa\u529b\u60f3\u51fa\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

5. \u90e8\u7f72\u662f\u81ea\u52a8\u7684\uff0c\u57fa\u4e8e\u5206\u652f\u6216\u57fa\u7ebf<\/strong><\/div>\n

\u5982\u679c\u4f60\u4e0d\u60f3\u6bcf\u6b21\u90e8\u7f72master\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u751f\u4ea7\u5206\u652f\u3002\u4f46\u662f\u8fd9\u91cc\u6ca1\u6709\u7406\u7531\u4e3a\u4ec0\u4e48\u4f60\u53ef\u80fd\u4f7f\u7528\u4e00\u4e2a\u811a\u672c\u6216\u767b\u5f55\u5230\u67d0\u4e2a\u5730\u65b9\u624b\u52a8\u90e8\u7f72\u3002\u8ba9\u4e00\u5207\u81ea\u52a8\u5316\uff0c\u6216\u8005\u4e00\u4e2a\u7279\u5b9a\u7684\u5206\u652f\u89e6\u53d1\u4e00\u6b21\u751f\u4ea7\u90e8\u7f72\u3002<\/p>\n

6. \u57fa\u7ebf\u662f\u4eba\u4e3a\u521b\u5efa\uff0c\u800c\u4e0d\u662fCI\u521b\u5efa<\/strong><\/div>\n

\u7528\u6237\u521b\u5efa\u4e00\u4e2a\u57fa\u7ebf\uff0c\u57fa\u4e8e\u90a3\u4e2a\u57fa\u7ebf\uff0cCI\u5c06\u6267\u884c\u4e00\u4e2a\u64cd\u4f5c\u3002\u4f60\u4e0d\u5e94\u8be5\u8ba9CI\u66f4\u6539\u4ee3\u7801\u4ed3\u5e93\u3002\u5982\u679c\u4f60\u9700\u8981\u975e\u5e38\u8be6\u7ec6\u7684\u6307\u6807\uff0c\u60a8\u5e94\u8be5\u6709\u4e00\u4e2a\u670d\u52a1\u5668\u62a5\u544a\u5217\u51fa\u4e86\u65b0\u7248\u672c\u3002<\/p>\n

7. \u4f9d\u8d56tags\u7248\u672c\u8fdb\u884c\u53d1\u5e03<\/strong><\/div>\n

\u5982\u679c\u4f60\u4e3a\u4f60\u7684\u9879\u76ee\u751f\u6210tag\uff0c\u8fd9\u8868\u793a\u4f60\u53d1\u5e03\u4e86\u4e00\u4e2a\u65b0\u7248\u672c\u3002<\/p>\n

8.\u7edd\u4e0d\u4ee5\u91cd\u7f6e\u65b9\u5f0f\u63d0\u4ea4\u53d8\u66f4<\/strong><\/div>\n

\u5982\u679c\u4f60\u5c06\u4e00\u4e2a\u9879\u76ee\u7684\u53d8\u66f4\u63d0\u4ea4\u5230\u4e00\u4e2a\u516c\u5171\u7684\u5206\u652f\u4e0a\uff0c\u4f60\u4e0d\u5e94\u8be5\u4f7f\u7528\u91cd\u7f6e\u65b9\u5f0f(\u5373\u4e0d\u5e94\u7528 git rebase),\u5426\u5219\u5c06\u9020\u6210\u96be\u4ee5\u8ffd\u8e2a\u4f60\u5bf9\u8be5\u9879\u76ee\u7684\u6539\u5584\u548c\u76f8\u5e94\u7684\u6d4b\u8bd5\u7ed3\u679c\uff0c\u8fd9\u6837\u505a\u5b9e\u9645\u4e0a\u7834\u574f\u4e86\u4ed6\u4eba\u9009\u62e9\u6700\u6709\u5229\u4e8e\u7684\u7248\u672c\u7684\u4f9d\u636e\u3002<\/p>\n

\u6211\u4eec\u6709\u65f6\u4e5f\u8fdd\u53cd\u8fd9\u6761\u51c6\u5219\uff0c\u5f53\u6211\u4eec\u8981\u6c42\u4e00\u4e2a\u8d21\u732e\u8005\u4f7f\u7528(git merage --spansh)\u63d0\u4ea4\u4ed6\u7684\u4fee\u6539\uff0c\u4ee5\u4fbf\u63d0\u4f9b\u771f\u5b9e\u7684\u4fee\u6539\u5386\u53f2\uff0c\u5ffd\u7565\u4ed6\u672c\u5730\u4e0d\u89c4\u8303\u7684\u4fee\u6539\u5386\u53f2\u65f6\u3002\u8fd9\u6837\u505a\u4ee5\u540e\u67e5\u9605\u4fee\u6539\u5386\u53f2\u65f6\uff0c\u5bb9\u6613\u6839\u636e\u4fee\u6539\u5386\u53f2\u505a\u7248\u672c\u6062\u590d\u3002\u4f46\u662f\u603b\u800c\u8a00\u4e4b \u63a8\u8350\u505a\u6cd5\u4e3a\uff1a\u4ee3\u7801\u5e94\u8be5\u7eaf\u51c0\uff0c\u4fee\u6539\u5386\u53f2\u5e94\u8be5\u771f\u5b9e\u3002<\/p>\n

9. \u6bcf\u4e2a\u4eba\u90fd\u5e94\u8be5\u4ece\u4e3b\u652f\u5f00\u59cb\uff0c\u5e76\u4e00\u76f4\u4ee5\u4e3b\u652f\u4e3a\u57fa\u7840<\/strong><\/div>\n

\u8fd9\u610f\u5473\u7740\u4f60\u4e0d\u4ece\u4efb\u4f55\u5206\u652f\u5f00\u59cb\u3002\u4f60\u68c0\u51fa\u4e3b\u652f\u5185\u5bb9,\u7136\u540e\u521b\u5efa\u4f60\u7684\u7279\u6027\uff0c\u63d0\u4ea4\u4f60\u7684\u5408\u5e76\u8bf7\u6c42\uff0c\u4e0b\u6b21\u4fee\u6539\u8fd8\u662f\u4ee5\u4e3b\u652f\u4e3a\u57fa\u7840\u3002\u5728\u4f60\u5408\u5e76\u5185\u5bb9\u5230\u4e3b\u679d\u4e0a\u65f6\uff0c\u4f60\u5e94\u8be5\u5b8c\u6210\u5ba1\u67e5\uff0c\u4e0d\u5e94\u8be5\u5305\u542b\u5176\u4ed6\u4e2d\u95f4\u9636\u6bb5\u7684\u5185\u5bb9\u3002<\/p>\n

10. \u5148\u4fee\u6539\u4e3b\u652f\u4e2d\u7684\u9519\u8bef\uff0c\u4e4b\u540e\u53d1\u5e03\u5206\u652f<\/strong><\/div>\n

\u5982\u679c\u4f60\u53d1\u73b0\u4e00\u4e2abug\uff0c\u6700\u5dee\u7684\u4e8b\u662f\u4f60\u4fee\u6539\u4e86\u521a\u53d1\u5e03\u7684\u7248\u672c\uff0c\u800c\u672a\u4fee\u6539\u4e3b\u652f\u3002<\/p>\n

\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\u53d1\u751f\uff0c\u4f60\u5e94\u8be5\u603b\u662f\u5148\u4fee\u6539\u4e3b\u679d\uff0c\u4e4b\u540e\u518d\u53d1\u5e03\u53e6\u5916\u4e00\u4e2a\u7248\u672c\u7528\u6765\u4fee\u590d\u5df2\u53d1\u5e03\u7248\u672c\u4e2d\u7684\u9519\u8bef\u3002<\/p>\n

11. \u63d0\u4ea4\u7684\u4fe1\u606f\u4e2d\u53cd\u5e94\u4f60\u4fee\u6539\u90e8\u5206\u7684\u610f\u56fe<\/strong><\/div>\n

\u4f60\u5e94\u8be5\u4e0d\u6b62\u8bf4\u660e\u4f60\u505a\u4e86\u4ec0\u4e48\uff0c\u8fd8\u5e94\u8be5\u8bf4\u660e\u4f60\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a\u3002\u5982\u679c\u4f60\u89e3\u91ca\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u505a\u800c\u6ca1\u6709\u4f7f\u7528\u5176\u4ed6\u65b9\u5f0f\uff0c\u8fd9\u5c06\u4f1a\u66f4\u6709\u7528\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/os.51cto.com\/art\/201608\/515834.htm<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/eleven-rule-gitlab.html<\/a>\u7f16\u8f91\u5458\uff1a\u6768\u5e06\uff0c\u5ba1\u6838\u5458\uff1a\u51af\u742a<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u4f7f\u7528 Git \u7248\u672c\u63a7\u5236\uff0c\u662f\u5bf9\u4f7f\u7528\u5b83\u4e4b\u524d\u7684\u6240\u6709\u7248\u672c\u63a7\u5236\u65b9\u5f0f\u7684\u4e00\u79cd\u6539\u8fdb\u3002\u7136\u800c\uff0c\u5f88\u591a\u7ec4\u7ec7\u6700\u7ec8\u4ee5\u592a\u8fc7\u6df7\u4e71\u6216\u8fc7\u4e8e\u590d\u6742\u7684\u6d41\u7a0b\u6765\u7ed3\u675f\u3002\u8fd9\u4e2a\u95ee\u9898\u5bf9\u4e8e\u521a\u4ece\u5176\u4ed6\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u8f6c\u8fc7\u6765\u7684\u7ec4\u7ec7\u6765\u8bf4\u7279\u522b\u7a81\u51fa\u3002<\/p>\n","protected":false},"author":63,"featured_media":26621,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-26391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/26391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=26391"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/26391\/revisions"}],"predecessor-version":[{"id":257464,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/26391\/revisions\/257464"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/26621"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=26391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=26391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=26391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}