1.先提交本地代码,防止被拉取其他分支的代码污染(self为自己的分支 other为想要拉取的分支)

git add .
git commit -m '备注信息'
git push origin self

2.然后git切换到你所要拉取的分支other  拉取该分支代码

git checkout other  
git pull origin other  

3.切回自己的分支

git checkout self
git merge other  

4.合并后代码提交到本地分支

git add .
git commit -m '备注信息'
git push origin self

 

相关文章:

  • 2021-12-10
  • 2021-11-20
  • 2021-08-05
  • 2021-07-29
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2022-01-01
  • 2022-12-23
  • 2021-11-20
  • 2021-06-10
  • 2021-10-01
相关资源
相似解决方案