1.当合并代码冲突特别多的时候,有时候只想提交自己分支的代码。这个时候使用cherry-pick 可以实现

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

 找到最近自己分支的提交记录,n表示提交的次数

git cherry-pick 用法

 

2)比如要提交第一次的代码到另外一个test分支,首先 git checkout test 切换到test分支,然后

git cherry-pick 4db0729d

git add -A

git commit -m "提交内容"

git push origin test  即可

相关文章:

  • 2021-07-21
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2022-12-23
  • 2021-03-31
  • 2021-10-26
相关资源
相似解决方案