?
指定路徑合并
先進入branch A :
git checkout branchA
將dir2中的變更轉移至branchA:
git checkout branchB dir2
所有變更將出現(xiàn)在branchA中的dir2中,檢查后提交即可。
git commit -m "sync branchB dir2 to branchA"
也可以創(chuàng)建新分支完成合并后再merge
先進入branch A :
git checkout branchA
創(chuàng)建和branch A一樣的臨時分支
git checkout -b tmp
將dir2中的變更轉移至tmp:
git checkout branchB dir2
所有變更將出現(xiàn)在tmp中的dir2中,檢查后提交即可。
git commit -m "sync branchB dir2 to branchA"
merge tmp部分到branchA文章來源:http://www.zghlxwxcb.cn/news/detail-480505.html
git checout branchA
git merge tmp
git指定路徑進行分支合并_git merge 指定目錄_知識學徒的博客-CSDN博客
https://blog.csdn.net/qq_46301671/article/details/124683287文章來源地址http://www.zghlxwxcb.cn/news/detail-480505.html
到了這里,關于git選擇指定分支中的指定目錄進行合并的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!