git工程分支的合并

来源:互联网 发布:pushkit java 编辑:程序博客网 时间:2024/05/16 12:38
    使用到git的分支合并的功能,先把问题描述下:local 有master和develop两个分支,对应远端的master、develop,现在local master中对工程代码修改了,然后想要将local master提交到remote develop, 然而remote develop的版本比remote master的源码版本要高,local master又是从remote master中 pull下来的,要想将local master对源码做的修改更新到remote develop,只能通过合并了,先将local develop从remote develop中更新最新的版本,再将local master中的修改的代码merge到local develop,将本地源码版本切换到local develop,再merge,选择将local master merge到local develop中,这时候会提示有合并冲突,使用resovel conflict,在conflict 文件列表下手动打开冲突的文件,再在代码合并窗口中将local master修改的源码替换或添加到local develop的对应文件中,手动合并完所有的conflict文件后,将local develop 工程push到remote develop,至此local master的修改就已经添加到remote develop中去了。
原创粉丝点击