"锛岃鑰呭鏄"/>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

Posted 寮€鍙戣€呮妧鏈墠绾?/a>

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!相关的知识,希望对你有一定的参考价值。

鐐瑰嚮鈥?/span>寮€鍙戣€呮妧鏈墠绾?/span>鈥濓紝閫夋嫨鈥滄槦鏍囸煍濃€?/span>

璁╀竴閮ㄥ垎寮€鍙戣€呯湅鍒版湭鏉?/span>

鍥炲鈥?66鈥濓紝鑾峰彇涓€浠芥妧鏈汉涓撳睘澶хぜ鍖?nbsp;杞嚜鍏紬鍙凤細鑵捐鎶€鏈伐绋?/span>

"鍥犱负涓嶆€庝箞浼欸it锛岃嚜宸卞钩鏃跺悎浠g爜鑰佸嚭閿欙紝鏈€杩戝叕鍙歌鍛橈紝鎴戣浼樺寲浜?/strong>"锛岃鑰呭鏄銆?/span>

浠婂ぉ璺熷ぇ瀹跺垎浜竴鐐归箙鍘傜▼搴忓憳鐨?Git 浣跨敤缁忛獙銆?/span>

浠嬬粛鍥涚宸ヤ綔娴佹潵鏇村ソ鍦扮悊瑙?Git 鐨勯」鐩娇鐢ㄦ祦绋嬶紝鍒╃敤鍏跺己澶х殑鍒嗘敮鍔熻兘涓鸿嚜宸辩殑椤圭洰鏋勭瓚閫傞厤鐨勫伐浣滄祦銆?/span>

1. 鍓嶈█

寮€鍙戜汉鍛樺湪鏃ュ父寮€鍙戣繃绋嬩腑锛屼笉鍙伩鍏嶅湴浼氫娇鐢ㄥ埌浠g爜鐨勭増鏈帶鍒跺伐鍏凤紝濡?svn銆乬it 绛夌瓑锛岃寰楀湪鍒氬垰鍏ヨ亴鐨勬椂鍊欙紝閮ㄩ棬浣跨敤鐨勪富瑕佺殑 VCS 宸ュ叿杩樻槸 svn锛屾湡闂存湁鐫€闈炲父鐥涜嫤鐨?download 缁忓巻锛屼笅杞戒竴浠戒粨搴撹姳浜嗘垜 2-3 涓皬鏃讹紝鐩告瘮浜?svn锛実it 鏈夌潃闈炲父澶氱殑浼樺娍锛屾瘮濡備粨搴?clone 閫熷害闈炲父蹇€佹牳蹇冪殑鍒嗘敮鍔熻兘绛夌瓑锛屽悗缁叕鍙镐篃鍦ㄦ帹浣跨敤 git 鏉ョ淮鎶や唬鐮佷粨搴擄紝瀹屽叏鎽掑純绗ㄩ噸鐨?svn銆?/span>

閭d箞锛屽垏鎹㈠埌 git 鏉ョ淮鎶や唬鐮佷粨搴擄紝浼氬鎴戜滑鐨勬棩甯稿紑鍙戦€犳垚褰卞搷鍚楋紵绛斿簲鏄樉鐒剁殑锛岄鍏堟垜浠渶瑕佸涔?git 鐨勫熀鏈蹇典笌鐢ㄦ硶锛岀劧鍚庡氨闇€瑕佹垜浠湪鍏蜂綋鐨勯」鐩疄璺佃繃绋嬩腑鎵撶(鎴戜滑鐨?git 浣跨敤鎶€宸э紝姣斿鐏垫椿鐨勫垎鏀€佸瓙妯″潡浣跨敤绛夌瓑锛屽叧浜?git 姒傚康鎴栨妧鏈笂鐨勪粙缁嶏紝鏈枃涓嶄簣灞曞紑锛屽鏋滃 git 瀹炵幇涓婄殑缁嗚妭鎰熷叴瓒g殑璇濓紝鍙互鑷鎼滅储瀛︿範銆?/span>

鎺ヤ笅鏉ヤ富瑕佽窡澶у鎺㈣鐨勪富棰樻槸 git 宸ヤ綔娴侊紝git 鍒濆鑰呭彲鑳藉杩欎釜姒傚康骞朵笉鏄緢娓呮櫚锛岃剳娴蜂腑鎯冲埌鐨勫彲鑳芥槸 git 鐨勫伐浣滃師鐞嗕箣绫荤殑锛屽叾瀹炲苟涓嶆槸鐨勶紝git 宸ヤ綔娴佹寚鐨勬槸澶氫汉鍗忎綔杩囩▼涓殑 git 鐨勪娇鐢ㄦ祦绋嬶紝涓嶆秹鍙婃妧鏈粏鑺傦紝鏄竴绉嶉」鐩鐞嗐€佸紑鍙戠害瀹氱殑鏂瑰紡銆傛湁浜涘悓瀛﹀彲鑳借寰椾範寰椾簡 git 涓夋澘鏂э紙clone銆乤dd commit銆乸ush锛夊氨绠楁槸瀹屾垚浜嗗 git 鐨勫紑鍙戣鐭ワ紝鍏跺疄鍜变滑鍙兘杩樺仠鐣欏湪鏈€鍘熷鐨勬兂璞′箣涓€?/span>

2. 闆嗕腑寮忓伐浣滄祦

闆嗕腑寮忓伐浣滄祦锛岃繖绉嶅伐浣滄柟寮忓浜庝娇鐢ㄨ繃 svn 鐨勫悓瀛︽兂蹇呬細闈炲父鐨勭啛鎮夛紝璁╂垜浠€濊€冧笅鍦?svn 涓嬬殑鍗忎綔浣撻獙锛屼笉鍚岀殑寮€鍙戝悓瀛﹂渶瑕佷緷娆″皢鏈湴鐨勪慨鏀规彁浜ゅ埌鏈嶅姟鍣紝濡傛灉鏈夊啿绐佸氨鍏堣В鍐虫湰鍦扮殑鍐茬獊鍐嶆彁浜わ紝杩欎釜杩囩▼涓繙绔殑鏈嶅姟鍣ㄥ氨鍍忔槸涓€涓泦涓鐞嗚€咃紝绠$悊鐫€鎵€鏈変汉鐨勪唬鐮佹彁浜わ紝鎵€浠?svn 鐨勫紑鍙戝崗浣滄祦绋嬪氨鏄吀鍨嬬殑闆嗕腑寮忓伐浣滄祦锛岄偅鍒囨崲鍒?git 鍦烘櫙涓嬶紝闆嗕腑寮忓伐浣滄祦鐨勫伐浣滄柟寮忓張鏄粈涔堟牱鐨勫憿锛?/span>

棣栧厛鎴戜滑鐪嬩笅 git 鐨勫熀纭€鎿嶄綔妗嗘灦锛屽鍥?2.1 鎵€绀猴細

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

杩欓噷鏈変竴浠戒腑澶粨搴擄紝鏄瓨鏀鹃」鐩唬鐮佺殑鍦版柟锛屼笁涓紑鍙戜汉鍛?A銆丅銆丆 鍒嗗埆鍦ㄦ湰鍦版寔鏈変竴浠戒腑澶粨搴撶殑鎷疯礉 - 鏈湴浠撳簱锛岃繖閲岀浉姣斾簬 svn 鐨勬鏋跺彧鏄浜嗕竴涓湰鍦颁粨搴擄紱

鎺ヤ笅鏉ユ垜浠啀鏉ョ湅鍦ㄩ」鐩紑鍙戣繘琛屼簡涓€娈垫椂闂翠箣鍚庣殑鎻愪氦鏃ュ織鏄粈涔堟牱鐨勶紝濡傚浘 2.2 鎵€绀猴細

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

杩欓噷鏄竴鏉℃渶绠€鍗曠殑 master 鍒嗘敮涓婄殑鎻愪氦鏃ュ織璁板綍锛岄偅鐩告瘮浜?svn 鐨勬鏋舵湁鍟ュ尯鍒憿锛屽彧瑕佹妸 master 鍒嗘敮瀛楁牱鏀规垚 trunk 灏卞彉鎴愪簡涓€鏉?svn 鐨勬彁浜よ褰曘€?/span>

鏈€鍚庯紝鎴戜滑鑰冭檻浠ヤ笅鍑犱釜鏉′欢锛?/span>

1銆佹湁鏃犳湰鍦颁粨搴?/span>2銆侀粯璁ゅ垎鏀槸 master 杩樻槸 trunk3銆佹彁浜ゆ搷浣滀娇鐢?git command 杩樻槸 svn command锛堢粏鑺傚拷鐣ワ級

鎴戜滑鍙互鐪嬪嚭 svn 涓嬬殑闆嗕腑寮忓伐浣滄祦鍚屾牱閫傜敤浜?git锛屽彧瑕佸ぇ瀹舵妸 svn 鐩稿叧鐨勬蹇靛叏閮ㄥ垏鎹㈠埌 git 涓嬪嵆鍙細1銆佽璇嗘湰鍦颁粨搴?/span>2銆佽璇嗛粯璁ゅ垎鏀?master3銆佷娇鐢?git 鐨勬彁浜ゅ懡浠?/span>

浠ヤ笂涓夌偣涓殑鍓嶄袱鐐瑰浜庨泦涓紡宸ヤ綔娴佷笅鐨勫紑鍙戣€呭叾瀹炴槸閫忔槑鐨勶紝寮€鍙戣€呭彧闇€瑕佸皢鎻愪氦鍛戒护鏀规垚 git 灏卞彲浠ユ棤缂濊鎺?svn 涓嬬殑闆嗕腑寮忓伐浣滄祦锛?/span>

鎵€浠ワ紝svn 鍒囨崲鍒?git 鐨勬垚鏈叾瀹炶繕鏄緢浣庣殑锛屽彧闇€瑕佷綘鎺屾彙 git 鐨勫熀纭€鎻愪氦鍛戒护锛?/span>

git 涓嬬殑闆嗕腑寮忓伐浣滄祦锛屾槸涓€绉嶅彧浣跨敤 master 涓诲垎鏀殑寮€鍙戞柟寮忥紝杩欑鏂瑰紡绠€鍗曟槑浜嗭紝浣嗘槸缂虹偣鏄笉鍚屽紑鍙戜汉鍛樼殑鎻愪氦鏃ュ織娣锋潅鍦ㄤ竴璧凤紝闅句互瀹氫綅闂銆?/span>

3. 鍔熻兘鍒嗘敮宸ヤ綔娴?/span>

鍔熻兘鍒嗘敮宸ヤ綔娴侊紝杩欑宸ヤ綔鏂瑰紡鏄互闆嗕腑寮忓伐浣滄祦涓哄熀纭€锛屽啀涓轰笉鍚屽姛鑳藉紑鍙戝垎閰嶅崟鐙殑鍔熻兘鍒嗘敮鏉ヨ繘琛岀殑锛涜繖绉嶅伐浣滄祦鐨勪富骞插垎鏀粛鐒舵槸 master 鍒嗘敮锛屼絾鏄紑鍙戣€呭湪杩涜鏃ュ父闇€姹傚紑鍙戞椂涓嶈兘灏嗕唬鐮佺洿鎺ユ彁浜ゅ埌 master 鍒嗘敮涓婏紝涓€鑸槸涓虹壒瀹氱殑闇€姹傛柊寤轰竴涓姛鑳藉垎鏀紝骞朵笖鍙栦竴涓叿鏈夋弿杩版€х殑鍚嶅瓧锛屼緥濡傦細feat-personal-page銆乮ssue-#1702锛屾弿杩版€х殑鍚嶇О鍙互璁╁叾浠栧紑鍙戣€呭揩閫熷湴鏄庣櫧杩欎釜鍔熻兘鍒嗘敮鐨勪富瑕佷綔鐢紝鎻愰珮涓嶅悓寮€鍙戣€呬箣闂寸殑鍗忓悓鏁堢巼锛涘姛鑳藉垎鏀姛鑳芥祦鐨勬彁浜ゆ棩蹇楄褰曞鍥?3.1 鎵€绀猴細

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

浠庡浘涓彲浠ョ湅鍑猴紝鐩告瘮浜庨泦涓紡宸ヤ綔娴侊紝鍒嗘敮鍘嗗彶鐪嬭捣鏉ユ洿鍔犵畝娲併€佸悎鐞嗭紝璁╀笉鍚屽姛鑳界殑寮€鍙戣繘琛岄殧绂伙紝閬垮厤涓嶅悓鍔熻兘浠g爜涔嬮棿浜х敓涓嶅埄鐨勫奖鍝嶃€?/span>

姝ゅ锛屽湪鍔熻兘鍒嗘敮涓婄殑闇€姹傚紑鍙戝畬鎴愪箣鍚庯紝鎴戜滑闇€瑕佸皢鍒嗘敮鍚堝苟鍒颁富骞插垎鏀?master 涓婏紝杩欐椂鍊欓渶瑕佽繘琛岀殑鎿嶄綔鏄?pull request锛屼负浠€涔堣杩涜 PR 鎿嶄綔锛岃€屼笉鏄洿鎺ヨ繘琛屼唬鐮佺殑 merge 鍛紝杩欓噷棣栧厛闇€瑕佸ぇ瀹惰璇?PR 鏄粈涔堟搷浣滐紝鍏舵闇€瑕佸ぇ瀹朵簡瑙?PR 鎿嶄綔鐨勬剰涔夛紱

鍔熻兘闇€姹傚紑鍙戝畬鎴愪箣鍚庯紝闇€瑕佸皢鏈湴鍔熻兘鍒嗘敮鎺ㄩ€佸埌涓ぎ浠撳簱鐨勫姛鑳藉垎鏀笂锛岀劧鍚庡湪涓ぎ浠撳簱鐨勫姛鑳藉垎鏀笂鍙戣捣涓€涓?pull request 璇锋眰鍘诲皢鍔熻兘鍒嗘敮涓婄殑淇敼鍚堝苟鍒?master 鍒嗘敮涓婏紝杩欎釜杩囩▼涓€鑸槸鍦?GIT 鐨勯」鐩富椤典笂杩涜锛屽叕鍙稿唴閮ㄥ氨宸ヨ渹鐨勯」鐩富椤碉紝濡傚浘 3.2 鎵€绀猴紝鏄?flutter 椤圭洰鐨勬煇涓€娆?PR 璇︽儏锛?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

PR 鎿嶄綔缁欓」鐩甫鏉ョ殑鐩婂鏈変袱鐐癸細1銆乧ode review2銆佽璁轰唬鐮佺殑鍏叡骞冲彴

鍓嶈€呮槸姣忔 PR 鎿嶄綔鍙戠敓鏃朵細閫氱煡鐩稿叧鑰呮潵妫€鏌ュ緟鍚堝苟鐨勪唬鐮侊紝鍦ㄦ鏌ヨ繃绋嬩腑鍗冲畬鎴愪簡瀵逛唬鐮佺殑妫€瑙嗭紝杩欎釜杩囩▼淇濋殰浜?master 鍒嗘敮涓婄殑宸插悎骞朵唬鐮佺殑鍋ュ.鎬э紱鍚庤€呭垯鏄洜涓烘瘡娆?PR 閮戒細鏈変竴涓?PR 璇︽儏涓婚〉锛屽鍥?3.2锛屾瘡涓€涓紑鍙戣€呴兘鍙互閽堝浠g爜鐨勫疄鐜版彁鍑鸿嚜宸辩殑鎰忚锛屼娇寰楄璁轰唬鐮佸彉鎴愭洿鍔犱究鎹烽珮鏁堬紝涓斾负浠g爜鍙樻洿鍥為【鎻愪緵浜嗗彲鑳姐€?/span>

鍔熻兘鍒嗘敮宸ヤ綔娴佹槸 git 椤圭洰寮€鍙戦潪甯哥伒娲讳娇鐢ㄧ殑涓€绉嶆柟寮忥紝浣嗘槸瀵逛簬澶у瀷鐨勯」鐩€岃█锛岄渶瑕佷负涓嶅悓鐨勫垎鏀垎閰嶆洿鍔犲叿浣撶殑瑙掕壊銆?/span>

4.Gitflow 宸ヤ綔娴?/span>

Gitflow 宸ヤ綔娴佹槸鐩墠闈炲父鎴愮啛鐨勪竴涓柟妗堬紝瀹冨畾涔変簡涓€涓洿缁曢」鐩彂甯冪殑涓ユ牸鍒嗘敮妯″瀷锛岄€氳繃涓轰唬鐮佺爺鍙戙€侀」鐩彂甯冧互鍙婄淮鎶ゅ垎閰嶇嫭绔嬬殑鍒嗘敮鏉ヨ椤圭洰鐨勮凯浠h繃绋嬫洿鍔犲湴椤虹晠锛屼笉鍚屼簬涔嬪墠鐨勯泦涓紡宸ヤ綔娴佷互鍙婂姛鑳藉垎鏀伐浣滄祦锛実itflow 宸ヤ綔娴佸父椹荤殑鍒嗘敮鏈変袱涓細涓诲共鍒嗘敮 master銆佸紑鍙戝垎鏀?dev锛屾澶栭拡瀵归」鐩爺鍙戠殑鍚勪釜闃舵锛岃瀹氫簡鐗瑰畾鐨勫垎鏀€?/span>

闃舵鍒嗘敮甯搁┗ master銆乨ev 鐮斿彂 feature 鐑慨澶?hotfix 鍙戝竷 release

棣栧厛閽堝甯搁┗鍒嗘敮锛屽鍥?4.1

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

甯搁┗鍒嗘敮琛ㄧず鍦ㄩ」鐩彁浜ゅ巻鍙蹭腑涓€鐩村瓨鍦ㄧ殑鍒嗘敮锛岃繖閲?master 鍒嗘敮涓昏璺熻釜椤圭洰姝e紡鍙戝竷鐨勪唬鐮佸巻鍙诧紝dev 鍒嗘敮涓昏璺熻釜椤圭洰浠g爜鐮斿彂鐨勬彁浜ゅ巻鍙诧紱姝ゅ鍦?master 鍒嗘敮涓婇€氬父浼氫负鏌愭鐗堟湰鍙戝竷鍒嗛厤涓€涓爣绛炬潵璁板綍鐗堟湰鍙凤紝杩欎负浠ュ悗椤圭洰鎺掓煡瀹氫綅鎻愪緵渚垮埄銆?/span>

鎺ヤ笅鏉ワ紝鎴戜滑鏉ョ湅 gitflow 宸ヤ綔娴佷腑锛屼唬鐮佺爺鍙戦樁娈电殑宸ヤ綔娴佺▼銆?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

濡傚浘 4.2 鎵€绀猴紝寮€鍙戦樁娈靛紑鍚煇涓€涓渶姹傛椂闇€瑕佷粠 dev 鍒嗘敮涓婃柊寤哄姛鑳藉垎鏀?feature锛屽浘涓墍绀轰负涓や釜 feature 鍒嗘敮锛屼唬琛ㄥ悓鏃舵湁涓や釜鍔熻兘鍦ㄥ紑鍙戜腑锛岃繖閲岀殑 feature 鍒嗘敮浣跨敤璺熷姛鑳藉垎鏀伐浣滄祦涓殑浣跨敤鏂瑰紡鏄竴鏍风殑锛屽湪闇€姹傚紑鍙戝畬鎴愪箣鍚庨渶瑕佹彁浜?PR 璇锋眰鍚堝苟杩?dev 鍒嗘敮锛屽畬鎴愪箣鍚庡嵆鍙垹闄ゅ搴旂殑鍔熻兘鍒嗘敮銆?/span>

寰堝鏃跺€欙紝鍦ㄩ渶姹傜爺鍙戣繃绋嬩腑锛岀嚎涓婄殑浠g爜鍙兘浼氬嚭鐜伴棶棰橈紝杩欐椂鍊欓渶瑕佹垜浠繘琛屽強鏃剁殑淇锛岃繖灏辨槸椤圭洰杩唬杩囩▼涓殑鐑慨澶嶉樁娈点€?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

濡傚浘 4.3 鎵€绀猴紝鍋囪鎴戜滑鍦ㄥ紑鍙戠殑杩囩▼涓嚎涓婂嚭鐜颁簡涓€涓?bug锛岃繖鏃跺€欐垜浠渶瑕佷粠 master 鐨勬爣绛?v0.1 涓婃鍑轰竴浠藉垎鏀唬鐮?hotfix锛屼慨澶嶅苟楠岃瘉濂戒簡涔嬪悗锛岄渶瑕佸皢 hotfix 浠g爜鍒嗗埆鍚堝苟鍒?master /dev 鍒嗘敮涓婏紝骞跺湪 master 鐨勬彁浜や笂鎵撲笂涓€涓爣绛?v0.2锛岃繖閲岄渶瑕佸皢鐑慨澶嶇殑浠g爜鍒嗗埆鍚堝苟杩涗袱涓父椹诲垎鏀槸鍥犱负闇€瑕佷繚闅滀袱杈逛唬鐮佺殑涓€鑷存€с€?/span>

鏈€鍚庯紝鎴戜滑鏉ョ湅涓嬮」鐩凯浠g殑鍙戝竷闃舵锛屾垜浠渶瑕佸皢涔嬪墠鍔熻兘寮€鍙戝畬鎴愮殑鐗规€у彂甯冨埌绾夸笂鍘伙紝濡傚浘 4.4 鎵€绀?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

棣栧厛鍦?dev 鍒嗘敮鐨勬彁浜ゅ鏂板缓 release 鍒嗘敮锛屽湪杩欎釜鍒嗘敮涓婅繘琛?bug 淇銆侀潰鍚戝彂甯冪殑涓€浜涗换鍔★紝杩欎釜鍒嗘敮涓嶅仛浠讳綍鍔熻兘涓婄殑浠诲姟锛屽畬鎴愪箣鍚庡皢 release 鍒嗘敮鍐嶅垎鍒悎骞惰繘 master/dev 鍒嗘敮锛屽苟鍦?master 鎻愪氦涓婃墦涓婃爣绛?v1.0锛岃繖鏍蜂竴涓彂甯冮樁娈电殑浠g爜鎿嶄綔灏卞畬鎴愪簡

鏈€鍚庢垜浠潵鐪嬪彂甯冧箣鍚庣殑鐩墠鐨勬棩蹇楄褰曟儏鍐碉紝濡傚浘 4.5 鎵€绀猴紝杩欓噷鍙互灏嗘病鏈夌敤鐨勫垎鏀?hotfix銆乺elease銆乫eature 鍧囧垹闄や簡锛屽彲浠ョ湅鍑烘垜浠殑甯搁┗鍒嗘敮灏?master/dev锛屾渶涓嬮潰鐨?feature 琛ㄧず浠嶅湪寮€鍙戜腑銆?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

gitflow 宸ヤ綔娴佹槸鐩墠姣旇緝寰堟垚鐔熺殑鏂规锛屽畠鐨勪紭鐐规湁锛?/span>

1銆佸彂甯冭凯浠f祦绋嬫洿椤虹晠2銆佷娇寰椾唬鐮佹湁浜嗘洿鍔犱弗璋ㄧ殑椤圭洰缁撴瀯锛屾柟渚垮畾浣嶆帓鏌ラ棶棰?/span>

澶у瀷鐨勯」鐩?/ 杩唬閫熷害蹇殑鎺ㄨ崘浣跨敤杩欑宸ヤ綔娴佺▼锛?/span>

5.Forking 宸ヤ綔娴?/span>

鏈€鍚庝粙缁嶄竴绉嶅紑婧愰」鐩父鐢ㄧ殑宸ヤ綔娴?鈥斺€擣orking 宸ヤ綔娴侊紝浠嬬粛涔嬪墠棣栧厛闇€瑕佷簡瑙d粈涔堟槸 fork 鎿嶄綔锛屽鍥?5.1 鎵€绀?/span>

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

fork 鎿嶄綔鏄湪涓汉杩滅▼浠撳簱鏂板缓涓€浠界洰鏍囪繙绋嬩粨搴撶殑鎷疯礉锛屾搷浣滃緢绠€鍗曪紝姣斿 github 涓婂湪椤圭洰鐨勪富椤电偣鍑?fork 鎸夐挳鍗冲彲銆?/span>

鏄庣櫧浜?fork 鎿嶄綔涔嬪悗锛屾垜浠潵鐪嬩笅 forking 宸ヤ綔娴佺殑娴佺▼锛屽鍥?5.2 鎵€绀猴細

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

棣栧厛寮€鍙戣€?A 鎷ユ湁涓€涓繙绔粨搴擄紝杩欐椂鍊欐湁涓€涓紑鍙戣€?C 涔熸兂鍙備笌 A 鐨勮繖涓」鐩殑寮€鍙戝伐浣滐紝閭d粬灏卞彲浠?fork 涓€浠?A 鐨勮繖涓粨搴擄紝涔嬪悗鍦?c 鐨勪釜浜轰粨搴撻噷灏辨湁浜嗚繖浠戒唬鐮佸簱锛屽悗缁紑鍙戣€?C 灏卞彲浠ュ湪鑷繁鐨勮繖涓」鐩噷杩涜寮€鍙戝伐浣滐紝c 鍦ㄥ畬鎴愪簡鏌愪釜鍔熻兘鐨勫疄鐜颁箣鍚庯紝鍙互缁?A 鐨勪粨搴撳彂涓€涓?PR 璇锋眰锛岃繖鏃跺€欎細閫氱煡鍒板紑鍙戣€?A 鏈夋柊鐨?PR锛孉 濡傛灉鏈夐棶棰樺彲浠ョ洿鎺ュ湪杩欎釜 PR 閲屾彁锛屽紑鍙戣€?C 鍙互杩涜杩涗竴姝ョ殑淇敼锛屾渶鍚?A 閫氳繃浜?C 鐨勮繖浠?PR 璇锋眰锛屽氨浼氬皢 C 鐨勪唬鐮佸悎骞惰繘 A 鐨勪粨搴擄紝杩欐牱灏卞畬鎴愪簡 A / 浠g爜搴撴柊鐗规€х殑寮€鍙戙€傚悓鏃跺鏋滄湁鍏朵粬寮€鍙戣€呭 A 鐨勯」鐩湁鍏磋叮涔熶細杩涜鐩稿悓鐨勬搷浣溿€?/span>

杩欓噷娉ㄦ剰鍒?寮€鍙戣€?B/C 骞朵笉鏄?A 浠g爜搴撶殑寮€鍙戜汉鍛橈紝鑰屾槸绗笁鏂瑰紑鍙戣€咃紝鎵€浠ヨ繖绉嶅伐浣滄祦涓昏鐢ㄤ簬寮€婧愰」鐩紒

6. 鎬荤粨

鏈€鍚庡洖椤句笅杩欏嚑绉?git 宸ヤ綔娴侊紝闆嗕腑寮忓伐浣滄祦鍙互璇存槸 git 宸ヤ綔娴佺殑鍩虹锛屽垵瀛﹁€呭彲浠ユ棤缂濆湴浠?svn 鐨勬ā寮忓垏鎹㈠埌 git 鐨勬ā寮忥紱鍔熻兘鍒嗘敮宸ヤ綔娴佸湪闆嗕腑寮忕殑鍩虹涓婂張寮曞叆浜嗗姛鑳藉垎鏀紝鐏垫椿鍦板埄鐢ㄤ簡 git 鐨勫垎鏀壒鎬э紝鍔熻兘鍒嗙 / PR 浼樺寲浜嗘棩甯稿伐浣滅殑鏁堢巼锛沢itflow 宸ヤ綔娴佸垯鏄负澶у瀷椤圭洰鐨勮凯浠h繃绋嬫湇鍔$殑锛屾寚瀹氫簡涓€涓弗鏍肩殑鍒嗘敮妯″瀷锛屼娇寰楄凯浠f祦绋嬫洿鍔犻『鐣咃紱forking 宸ヤ綔娴佸垯鏄紑婧愰」鐩殑棣栭€夛紝鎯宠涓哄紑婧愰」鐩仛璐$尞灏卞繀椤昏鎳傚緱杩欑宸ヤ綔娴侊紒

褰撶劧锛屼互涓婃弿杩扮殑杩欎簺宸ヤ綔娴佸苟涓嶆槸瀹為檯宸ヤ綔涓?git 浣跨敤鐨勫噯鍒欙紝杩欏彧鏄竴浜涙帹鑽愮殑浣跨敤鏂瑰紡锛屽湪鍏蜂綋鐨勯」鐩爺鍙戣繃绋嬩腑锛屾垜浠渶瑕佺粨鍚堥」鐩互鍙婂洟闃熺幇鐘朵綔鍑哄彇鑸嶏紝鎬荤粨鍑洪€傚悎鑷繁鍥㈤槦鐨勫伐浣滄祦锛屾墠鑳借 git 鏇村ソ鍦颁负鎴戜滑鏈嶅姟锛?/span>

 
   
   
 
                              
                                
                                
                              



END


鍓嶇嚎鎺ㄥ嚭瀛︿範浜ゆ祦涓€瀹氳澶囨敞锛?/span> 鐮旂┒/宸ヤ綔鏂瑰悜+鍦扮偣+瀛︽牎/鍏徃+鏄电О锛堝Java+涓婃捣+涓婁氦+鍗″崱锛?/span> 锛屾牴鎹牸寮忓娉紝鍙洿蹇閫氳繃涓旈個璇疯繘缇?/span>

    鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

鎵爜鍔╂墜灏忓濮愬井淇★紝杩涚兢澶у巶鍐呮帹&澶т浆鎶€鏈氦娴?/p>



END


寮€鍙戣€呮妧鏈墠绾?锛屾眹闆嗘妧鏈墠绾垮揩璁拰鍏虫敞琛屼笟瓒嬪娍锛屽ぇ鍘傚共璐э紝鏄紑鍙戣€呯粡鍘嗗拰鎴愰暱鐨勪紭绉€鎸囧崡 銆?/span>
ps:鍚庡彴鍥炲 鈥滈潰璇曗€?amp;鈥濊祫鏂欌€?/span> 鏁扮櫨闈㈣瘯鎵嬪唽锛屽嵆鍙鍙栫▼搴忓憳澶хぜ鍖呯瓑浣?/span>
鍘嗗彶鎺ㄨ崘






鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!
鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!
濂芥枃鐐逛釜鍦ㄧ湅鍚э紒

以上是关于鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!的主要内容,如果未能解决你的问题,请参考以下文章

鍓嶇涔嬭矾锛氱敤 Angular 瑙勮寖鏉ョ害鏉熷洟闃?git 鎻愪氦

鏍规嵁 Promise/A+ 鍜?ES6 瑙勮寖锛屽疄鐜?Promise 婧愮爜锛堥檮璇︾粏娉ㄩ噴鍜屾祴璇曪級

RESTful瑙勮寖

浜笢璺ㄧ缁熶竴妗嗘灦 Taro 1.3 姝e紡鍙戝竷锛氬紩鍏lutter Doctor 锛屽叏闈㈡敮鎸丷eact Hooks鍜孞SX锛屽揩搴旂敤

鎴戞槸濡備綍鎶?GitHub 寮€婧愰」鐩仛鍒?5300+ star 鐨勶紵