git cherry-pick 用法

1.當合並代碼衝突特別多的時候,有時候只想提交本身分支的代碼。這個時候使用cherry-pick 能夠實現git

 1)首先使用 git log --oneline -n blog

 找到最近本身分支的提交記錄,n表示提交的次數it

 

 

2)好比要提交第一次的代碼到另一個test分支,首先 git checkout test 切換到test分支,而後test

git cherry-pick 4db0729dim

git add -Adb

git commit -m "提交內容"img

git push origin test  便可co

相關文章
相關標籤/搜索