{"rsdb":{"rid":"152260","subhead":"","postdate":"0","aid":"114576","fid":"55","uid":"1","topic":"1","content":"
\n

\u6211\u4eec\u5df2\u7ecf\u4eceSVN \u5207\u6362\u5230Git\u5f88\u591a\u5e74\u4e86\uff0c\u73b0\u5728\u51e0\u4e4e\u6240\u6709\u7684\u9879\u76ee\u90fd\u5728\u4f7f\u7528Github\u7ba1\u7406, \u672c\u7bc7\u6587\u7ae0\u8bb2\u4e00\u4e0b\u4e3a\u4ec0\u4e48\u4f7f\u7528Git, \u4ee5\u53ca\u5982\u4f55\u5728\u56e2\u961f\u4e2d\u6b63\u786e\u4f7f\u7528\u3002<\/p> \n

Git\u7684\u4f18\u70b9<\/strong><\/p> \n

Git\u7684\u4f18\u70b9\u5f88\u591a\uff0c\u4f46\u662f\u8fd9\u91cc\u53ea\u5217\u51fa\u6211\u8ba4\u4e3a\u975e\u5e38\u7a81\u51fa\u7684\u51e0\u70b9\u3002<\/p> \n

\u7531\u4e8e\u662f\u5206\u5e03\u5f0f\uff0c\u6240\u6709\u672c\u5730\u5e93\u5305\u542b\u4e86\u8fdc\u7a0b\u5e93\u7684\u6240\u6709\u5185\u5bb9\u3002<\/p> \n

\u4f18\u79c0\u7684\u5206\u652f\u6a21\u578b\uff0c\u6253\u5206\u652f\u4ee5\u53ca\u5408\u5e76\u5206\u652f\uff0c\u673a\u5668\u65b9\u4fbf\u3002<\/p> \n

\u5feb\u901f\uff0c\u5728\u8fd9\u4e2a\u65f6\u95f4\u5c31\u662f\u91d1\u94b1\u7684\u65f6\u4ee3\uff0cGit\u7531\u4e8e\u4ee3\u7801\u90fd\u5728\u672c\u5730\uff0c\u6253\u5206\u652f\u548c\u5408\u5e76\u5206\u652f\u673a\u5668\u5feb\u901f\uff0c\u4f7f\u7528\u4e2aSVN\u7684\u80fd\u6df1\u523b\u4f53\u4f1a\u5230\u8fd9\u79cd\u4f18\u52bf\u3002<\/p> \n

\u611f\u5174\u8da3\u7684\uff0c\u53ef\u4ee5\u53bb\u770b\u4e00\u4e0bGit\u672c\u8eab\u7684\u8bbe\u8ba1\uff0c\u5185\u5728\u7684\u67b6\u6784\u4f53\u73b0\u4e86\u5f88\u591a\u7684\u4f18\u52bf\uff0c\u4e0d\u6127\u662f\u51fa\u8d44\u5929\u624d\u7a0b\u5e8f\u5458Linus (Linux<\/a>\u4e4b\u7236) \u4e4b\u624b<\/p> \n

\u7248\u672c\u7ba1\u7406\u7684\u6311\u6218<\/strong><\/p> \n

\u867d\u7136\u6709\u8fd9\u4e48\u4f18\u79c0\u7684\u7248\u672c\u7ba1\u7406\u5de5\u5177\uff0c\u4f46\u662f\u6211\u4eec\u9762\u5bf9\u7248\u672c\u7ba1\u7406\u7684\u65f6\u5019\uff0c\u4f9d\u7136\u6709\u975e\u5e38\u5927\u5f97\u6311\u6218\uff0c\u6211\u4eec\u90fd\u77e5\u9053\u5927\u5bb6\u5de5\u4f5c\u5728\u540c\u4e00\u4e2a\u4ed3\u5e93\u4e0a\uff0c\u90a3\u4e48\u5f7c\u6b64\u7684\u4ee3\u7801\u534f\u4f5c\u5fc5\u7136\u5e26\u6765\u5f88\u591a\u95ee\u9898\u548c\u6311\u6218\uff0c\u5982\u4e0b\uff1a<\/p> \n

\u5982\u4f55\u5f00\u59cb\u4e00\u4e2aFeature\u7684\u5f00\u53d1\uff0c\u800c\u4e0d\u5f71\u54cd\u522b\u7684Feature<\/p> \n

\u7531\u4e8e\u5f88\u5bb9\u6613\u521b\u5efa\u65b0\u5206\u652f\uff0c\u5206\u652f\u591a\u4e86\u5982\u4f55\u7ba1\u7406\uff0c\u65f6\u95f4\u4e45\u4e86\uff0c\u5982\u4f55\u77e5\u9053\u6bcf\u4e2a\u5206\u652f\u662f\u5e72\u4ec0\u4e48\u7684<\/p> \n

\u54ea\u4e9b\u5206\u652f\u5df2\u7ecf\u5408\u5e76\u56de\u4e86\u4e3b\u5e72<\/strong><\/p> \n

\u5982\u4f55\u8fdb\u884cRelease\u7684\u7ba1\u7406\u5f00\u59cb\u4e00\u4e2aRelease\u7684\u65f6\u5019\u5982\u4f55\u51bb\u7ed3Feature, \u5982\u4f55\u5728Prepare Release\u7684\u65f6\u5019\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u7ee7\u7eed\u5f00\u53d1\u65b0\u7684\u529f\u80fd<\/p> \n

\u7ebf\u4e0a\u4ee3\u7801\u51faBug\u4e86\uff0c\u5982\u4f55\u5feb\u901f\u4fee\u590d\u800c\u4e14\u4fee\u590d\u7684\u4ee3\u7801\u8981\u5305\u542b\u5230\u5f00\u53d1\u4eba\u5458\u7684\u5206\u652f\u4ee5\u53ca\u4e0b\u4e00\u4e2aRelease<\/p> \n

\u5927\u90e8\u5206\u5f00\u53d1\u4eba\u5458\u73b0\u5728\u4f7f\u7528Git\u5c31\u53ea\u662f\u7528\u4e09\u4e2a\u751a\u81f3\u4e24\u4e2a\u5206\u652f\uff0c\u4e00\u4e2a\u662fMaster, \u4e00\u4e2a\u662fDevelop, \u8fd8\u6709\u4e00\u4e2a\u662f\u57fa\u4e8eDevelop\u6253\u5f97\u5404\u79cd\u5206\u652f\u3002\u8fd9\u4e2a\u5728\u5c0f\u9879\u76ee\u89c4\u6a21\u7684\u65f6\u5019\u8fd8\u52c9\u5f3a\u53ef\u4ee5\u652f\u6491\uff0c\u56e0\u4e3a\u5f88\u591a\u4eba\u505a\u9879\u76ee\u5c31\u53ea\u6709\u4e00\u4e2aRelease, \u4f46\u662f\u4eba\u5458\u4e00\u591a\uff0c\u800c\u4e14\u9879\u76ee\u5468\u671f\u4e00\u957f\u5c31\u4f1a\u51fa\u73b0\u5404\u79cd\u95ee\u9898\u3002<\/p> \n

Git Flow<\/strong><\/p> \n

\u5c31\u50cf\u4ee3\u7801\u9700\u8981\u4ee3\u7801\u89c4\u8303\u4e00\u6837\uff0c\u4ee3\u7801\u7ba1\u7406\u540c\u6837\u9700\u8981\u4e00\u4e2a\u6e05\u6670\u7684\u6d41\u7a0b\u548c\u89c4\u8303<\/p> \n

Vincent Driessen \u540c\u5b66\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u63d0\u51fa\u4e86 A Successful Git Branching Model<\/p> \n

\u4e0b\u9762\u662fGit Flow\u7684\u6d41\u7a0b\u56fe<\/p> \n

<\/p> \n

\n \"\\\"\n <\/center> \n

<\/p> \n

\u4e0a\u9762\u7684\u56fe\u4f60\u7406\u89e3\u4e0d\u4e86 \u6ca1\u5173\u7cfb\uff0c\u8fd9\u4e0d\u662f\u4f60\u7684\u9519\uff0c\u6211\u89c9\u5f97\u8fd9\u5f20\u56fe\u672c\u8eab\u6709\u70b9\u95ee\u9898\uff0c\u8fd9\u5f20\u56fe\u5e94\u8be5\u5de6\u8f6c90\u5ea6\uff0c\u5927\u5bb6\u5e94\u8be5\u5c31\u5f88\u7528\u4ee5\u7406\u89e3\u4e86\u3002<\/p> \n

Git Flow\u5e38\u7528\u7684\u5206\u652f<\/strong><\/p> \n

Production \u5206\u652f<\/p> \n

\u4e5f\u5c31\u662f\u6211\u4eec\u7ecf\u5e38\u4f7f\u7528\u7684Master\u5206\u652f\uff0c\u8fd9\u4e2a\u5206\u652f\u6700\u8fd1\u53d1\u5e03\u5230\u751f\u4ea7\u73af\u5883\u7684\u4ee3\u7801\uff0c\u6700\u8fd1\u53d1\u5e03\u7684Release\uff0c \u8fd9\u4e2a\u5206\u652f\u53ea\u80fd\u4ece\u5176\u4ed6\u5206\u652f\u5408\u5e76\uff0c\u4e0d\u80fd\u5728\u8fd9\u4e2a\u5206\u652f\u76f4\u63a5\u4fee\u6539<\/p> \n

Develop \u5206\u652f<\/p> \n

\u8fd9\u4e2a\u5206\u652f\u662f\u6211\u4eec\u662f\u6211\u4eec\u7684\u4e3b\u5f00\u53d1\u5206\u652f\uff0c\u5305\u542b\u6240\u6709\u8981\u53d1\u5e03\u5230\u4e0b\u4e00\u4e2aRelease\u7684\u4ee3\u7801\uff0c\u8fd9\u4e2a\u4e3b\u8981\u5408\u5e76\u4e0e\u5176\u4ed6\u5206\u652f\uff0c\u6bd4\u5982Feature\u5206\u652f<\/p> \n

Feature \u5206\u652f<\/p> \n

\u8fd9\u4e2a\u5206\u652f\u4e3b\u8981\u662f\u7528\u6765\u5f00\u53d1\u4e00\u4e2a\u65b0\u7684\u529f\u80fd\uff0c\u4e00\u65e6\u5f00\u53d1\u5b8c\u6210\uff0c\u6211\u4eec\u5408\u5e76\u56deDevelop\u5206\u652f\u8fdb\u5165\u4e0b\u4e00\u4e2aRelease<\/p> \n

Release\u5206\u652f<\/p> \n

\u5f53\u4f60\u9700\u8981\u4e00\u4e2a\u53d1\u5e03\u4e00\u4e2a\u65b0Release\u7684\u65f6\u5019\uff0c\u6211\u4eec\u57fa\u4e8eDevelop\u5206\u652f\u521b\u5efa\u4e00\u4e2aRelease\u5206\u652f\uff0c\u5b8c\u6210Release\u540e\uff0c\u6211\u4eec\u5408\u5e76\u5230Master\u548cDevelop\u5206\u652f<\/p> \n

Hotfix\u5206\u652f<\/p> \n

\u5f53\u6211\u4eec\u5728Production\u53d1\u73b0\u65b0\u7684Bug\u65f6\u5019\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2aHotfix, \u5b8c\u6210Hotfix\u540e\uff0c\u6211\u4eec\u5408\u5e76\u56deMaster\u548cDevelop\u5206\u652f\uff0c\u6240\u4ee5Hotfix\u7684\u6539\u52a8\u4f1a\u8fdb\u5165\u4e0b\u4e00\u4e2aRelease<\/p> \n

Git Flow\u5982\u4f55\u5de5\u4f5c<\/strong><\/p> \n

\u521d\u59cb\u5206\u652f<\/strong><\/p> \n

\u6240\u6709\u5728Master\u5206\u652f\u4e0a\u7684Commit\u5e94\u8be5Tag<\/p> \n

<\/p> \n

\n \"\\\"\n <\/center> \n

<\/p> \n

Feature \u5206\u652f<\/p> \n

\u5206\u652f\u540d feature\/*<\/p> \n

Feature\u5206\u652f\u505a\u5b8c\u540e\uff0c\u5fc5\u987b\u5408\u5e76\u56deDevelop\u5206\u652f, \u5408\u5e76\u5b8c\u5206\u652f\u540e\u4e00\u822c\u4f1a\u5220\u70b9\u8fd9\u4e2aFeature\u5206\u652f\uff0c\u4f46\u662f\u6211\u4eec\u4e5f\u53ef\u4ee5\u4fdd\u7559<\/p> \n

<\/p> \n

\n \"\\\"\n <\/center> \n

<\/p> \n

Release\u5206\u652f<\/p> \n

\u5206\u652f\u540d release\/*<\/p> \n

Release\u5206\u652f\u57fa\u4e8eDevelop\u5206\u652f\u521b\u5efa\uff0c\u6253\u5b8cRelease\u5206\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8fd9\u4e2aRelease\u5206\u652f\u4e0a\u6d4b\u8bd5\uff0c\u4fee\u6539Bug\u7b49\u3002\u540c\u65f6\uff0c\u5176\u5b83\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u57fa\u4e8e\u5f00\u53d1\u65b0\u7684Feature (\u8bb0\u4f4f\uff1a\u4e00\u65e6\u6253\u4e86Release\u5206\u652f\u4e4b\u540e\u4e0d\u8981\u4eceDevelop\u5206\u652f\u4e0a\u5408\u5e76\u65b0\u7684\u6539\u52a8\u5230Release\u5206\u652f)<\/p> \n

\u53d1\u5e03Release\u5206\u652f\u65f6\uff0c\u5408\u5e76Release\u5230Master\u548cDevelop\uff0c \u540c\u65f6\u5728Master\u5206\u652f\u4e0a\u6253\u4e2aTag\u8bb0\u4f4fRelease\u7248\u672c\u53f7\uff0c\u7136\u540e\u53ef\u4ee5\u5220\u9664Release\u5206\u652f\u4e86\u3002<\/p> \n

<\/p> \n

\n \"\\\"\n <\/center> \n

<\/p> \n

\u7ef4\u62a4\u5206\u652f Hotfix<\/p> \n

\u5206\u652f\u540d hotfix\/*<\/p> \n

hotfix\u5206\u652f\u57fa\u4e8eMaster\u5206\u652f\u521b\u5efa\uff0c\u5f00\u53d1\u5b8c\u540e\u9700\u8981\u5408\u5e76\u56deMaster\u548cDevelop\u5206\u652f\uff0c\u540c\u65f6\u5728Master\u4e0a\u6253\u4e00\u4e2atag<\/p> \n

<\/p> \n

\n \"\\\"\n <\/center> \n

<\/p> \n

Git Flow\u4ee3\u7801\u793a\u4f8b<\/p> \n

\r\na. \u521b\u5efadevelop\u5206\u652f\r\n\r\ngit branch develop\r\n\r\ngit push -u origin develop\r\n\r\nb. \u5f00\u59cb\u65b0Feature\u5f00\u53d1\r\n\r\ngit checkout -b some-feature develop\r\n\r\n# Optionally, push branch to origin:\r\n\r\ngit push -u origin some-feature\r\n\r\n# \u505a\u4e00\u4e9b\u6539\u52a8\r\n\r\ngit status\r\n\r\ngit add some-file\r\n\r\ngit commit\r\n\r\nc. \u5b8c\u6210Feature\r\n\r\ngit pull origin develop\r\n\r\ngit checkout develop\r\n\r\ngit merge --no-ff some-feature\r\n\r\ngit push origin develop\r\n\r\ngit branch -d some-feature\r\n\r\n# If you pushed branch to origin:\r\n\r\ngit push origin --delete some-feature\r\n\r\nd. \u5f00\u59cbRelase\r\n\r\ngit checkout -b release-0.1.0 develop\r\n\r\n# Optional: Bump version number, commit\r\n\r\n# Prepare release, commit\r\n\r\ne. \u5b8c\u6210Release\r\n\r\ngit checkout master\r\n\r\ngit merge --no-ff release-0.1.0\r\n\r\ngit push\r\n\r\ngit checkout develop\r\n\r\ngit merge --no-ff release-0.1.0\r\n\r\ngit push\r\n\r\ngit branch -d release-0.1.0\r\n\r\n# If you pushed branch to origin:\r\n\r\ngit push origin --delete release-0.1.0\r\n\r\ngit tag -a v0.1.0 master\r\n\r\ngit push --tags\r\n\r\nf. \u5f00\u59cbHotfix\r\n\r\ngit checkout -b hotfix-0.1.1 master\r\n\r\ng. \u5b8c\u6210Hotfix\r\n\r\ngit checkout master\r\n\r\ngit merge --no-ff hotfix-0.1.1\r\n\r\ngit push\r\n\r\ngit checkout develop\r\n\r\ngit merge --no-ff hotfix-0.1.1\r\n\r\ngit push\r\n\r\ngit branch -d hotfix-0.1.1\r\n\r\ngit tag -a v0.1.1 master\r\n\r\ngit push --tags\r\n\r\nGit flow\u5de5\u5177<\/pre> \n 

\u5b9e\u9645\u4e0a\uff0c\u5f53\u4f60\u7406\u89e3\u4e86\u4e0a\u9762\u7684\u6d41\u7a0b\u540e\uff0c\u4f60\u5b8c\u5168\u4e0d\u7528\u4f7f\u7528\u5de5\u5177\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u6211\u4eec\u5927\u90e8\u5206\u4eba\u5f88\u591a\u547d\u4ee4\u5c31\u662f\u8bb0\u4e0d\u4f4f\u5440\uff0c\u6d41\u7a0b\u5c31\u662f\u8bb0\u4e0d\u4f4f\u5440\uff0c\u80bf\u4e48\u529e\u5462","orderid":"0","title":"Git \u5728\u56e2\u961f\u4e2d\u7684\u6700\u4f73\u5b9e\u8df5--\u5982\u4f55\u6b63\u786e\u4f7f\u7528Git Flow(\u4e00)","smalltitle":"","mid":"0","fname":"windows\u7f16\u7a0b\u57fa\u7840","special_id":"0","bak_id":"0","info":"0","hits":"2597","pages":"2","comments":"0","posttime":"2016-04-23 17:38:57","list":"1461404337","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/article\/55\/1_smg4s__.png","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Git<\/A> \u56e2\u961f<\/A> \u6700\u4f73<\/A> \u5b9e\u8df5<\/A> \u5982\u4f55<\/A> \u6b63\u786e<\/A> \u4f7f\u7528<\/A> Flow<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.31","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"Git \u5728\u56e2\u961f\u4e2d\u7684\u6700\u4f73\u5b9e\u8df5--\u5982\u4f55\u6b63\u786e\u4f7f\u7528Git Flow","lastview":"1713997890","digg_num":"9641","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}