首页 > 其他 > 详细

git合并分支代码的方法

时间:2019-11-13 16:34:05      阅读:60      评论:0      收藏:0      [点我收藏+]

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

 

git合并分支代码的方法

原文:https://www.cnblogs.com/lxl0419/p/11850522.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!