澶氫釜git椤圭洰搴撲箣闂寸殑git cherry-pick浠g爜鍚屾

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了澶氫釜git椤圭洰搴撲箣闂寸殑git cherry-pick浠g爜鍚屾相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/tomat' title='tomat'>tomat   call   checkout   struct   bsp   git fetch   mail   conf   

杩欐鏃堕棿鍋氶」鐩棿鐨勪唬鐮佸垎绂伙紝浠巊it涓婄殑A搴?nbsp; fork涓€浠藉埌B搴擄紝鐒跺悗A搴撳拰B搴撳氨鍚勮嚜鐙珛鐨勯渶姹備唬鐮佸紑鍙戙€?/p>

杩欐牱A搴撳拰B搴撶殑寮€濮嬫椂浠g爜鍩烘湰鐩稿悓锛屼絾閬囧埌涓€涓棶棰橈紝鏈変簺鏃跺€橝搴撶殑浠g爜BUG淇敼锛岄渶瑕佸湪B搴撲腑鍐嶄慨鏀逛竴涓嬶紝涓嶅お鏂逛究銆?/p>

鍥犳锛屽氨璇曚竴涓嬬敤cherry-pick鏄惁鍙銆?/p>

 

缁忚繃缈荤湅涓€浜涘墠杈堟枃绔犲苟寮€濮嬪皾璇曪紝锛堜互鎶夾搴撶殑release鐨勬煇娆℃彁浜ommit-->commit id is XXXXX锛屾彁浜ゅ埌B搴撶殑release鍒嗘敮涓婁负渚嬶級姝ラ濡備笅锛?/p>

  1銆佹妸浠g爜鍒囧埌B搴撶殑release鍒嗘敮涓婏紝涓洪槻姝㈠嚭闂锛屽缓璁厛鎷夊彇涓€涓浠界殑鍒嗘敮銆?/p>

  2銆佹湰鍦版坊鍔犲彟涓€涓粨搴揂

 Zxxxxx5:B 1$ git remote add zhorigin http://git.xxxx.com/A.git

閫氳繃git remote -v 鍙互鏌ョ湅鏄惁娣诲姞鎴愬姛
Zxxxxx5:B 1$ git remote -v
origin  http://git.xxxx.com/B.git (fetch)
origin  http://git.xxxx.com/B.git (push)
zhorigin        http://git.xxxx.com/A.git (fetch)
zhorigin        http://git.xxxxcom/A.git (push)

  3銆乑xxxxx5:B 1$ git fetch zhorigin  杩欐椂浼氭妸杩滅▼A搴撶殑鍒嗘敮淇℃伅鍚屾鍒版湰鍦?br />
  4銆佽繖鏃跺€欏氨鍙互cherry-pick浜嗭紝閬囧埌鐩稿叧鐨勬彁绀猴紝鏍规嵁鎻愮ず鎿嶄綔灏辫浜?/p>

    Zxxxxx5:B 1$ git cherry-pick ac50e25bf

on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:
    git config --global --edit
After doing this, you may fix the identity used for this commit with:
    git commit --amend --reset-author

---------------------------------------------------------------
---------------------------------------------------------------

Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
    git config --global user.name "Your Name"
    git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
    git commit --amend --reset-author

 

 

 5銆佷笂闈㈢殑鎻愮ず锛屾搷浣滃畬鍚庯紝灏卞彲浠it push浜嗭紝杩欐椂鍊欙紝绁炲鐨勪竴骞曞嚭鐜颁簡,鎶婁慨澶岮搴撶殑BUG鍒嗘敮 clone浜嗕竴浠藉埌B搴撲笂浜嗭紝锛堝鏋滃湪A搴撶殑release鍒嗘敮鐩存帴淇敼鐨勶紝鍙兘灏辩洿鎺ush鍒癇搴撶殑release浜嗭紝鏈夊叴瓒g殑鍙互璇曚竴涓嬶級

Zxxxxx5:B 1$ git push
Enumerating objects: 69, done.
Counting objects: 100% (69/69), done.
Delta compression using up to 8 threads
Compressing objects: 100% (20/20), done.
Writing objects: 100% (39/39), 4.01 KiB | 2.00 MiB/s, done.
Total 39 (delta 13), reused 10 (delta 3)
To http://git.xxxx.com/B.git
   ccccc..yyyyyy  bugfix-branch-xxxx-A -> bugfix-branch-xxxx-A

6銆佽嚦姝搴撶殑BUG淇敼鍒嗘敮鍦˙搴撳凡缁忔湁浜嗭紝涔嬪悗鐨勬祦绋嬪氨绠€鍗曚簡锛屽拰鏅€氱殑cherry-pick娴佺▼涓€鏍蜂簡

   鏈湴纭繚鍒囧埌B搴撶殑release

  Zxxxxx5:B 1$ git checkout release
  Zxxxxx5:B 1$ git cherry-pick yyyyyy

  Zxxxxx5:B 1$ git push

 

澶囨敞锛?/span>

     杩欓噷闈㈡湁涓€浜涚粏鑺傦紝寰堟湁鎰忔€濓紝姣斿涓轰粈涔圓搴揷lone鍑轰竴涓垎鏀埌B搴擄紝鏂扮殑鍒嗘敮鐗堟湰鐨勮捣濮媍ommit id涓轰粈涔堟槸 ccccc绛夌瓑

 

以上是关于澶氫釜git椤圭洰搴撲箣闂寸殑git cherry-pick浠g爜鍚屾的主要内容,如果未能解决你的问题,请参考以下文章

鍚屼竴涓猼omcat閮ㄧ讲澶氫釜椤圭洰瀵艰嚧鍚姩澶辫触

鐧藉珫鐗?2019Java寮€鍙戝叏缁堢瀹炴垬绉熸埧椤圭洰瑙嗛鏁欑▼

Go 姣忔棩涓€搴撲箣 termtables

鏁版嵁搴撲箣MySQL鐨勪粙缁嶄笌浣跨敤20180703

缁勫缓vlan闂寸殑璺敱缃戠粶

鏌ヨSAP澶氫釜鏁版嵁搴撹〃澶у皬