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-08-06
  • 2021-08-29
  • 2021-09-08
  • 2021-09-20
  • 2021-08-04
  • 2021-08-06
  • 2021-10-30
  • 2021-09-30
猜你喜欢
  • 2019-02-12
  • 2020-04-19
  • 2019-09-18
  • 2020-06-22
  • 2018-02-09
  • 2020-09-29
  • 2018-02-02
  • 2021-11-09
相关资源
相似解决方案