git - source合并分支
高洛峰
高洛峰 2017-05-02 09:34:38
0
1
501

操作是这样的:
开发A:更改A文件代码。commit,push。
开发B:更改B文件代码。commit, pull, merge。

这两个操作都是在sourceTree图形界面进行的。

极少数情况下会在merge的时候将旧版本合并进去。参见下图。

sourceTree版本:v2.1。
git版本:2.6.4.

A文件变动:

merge:

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
阿神

B You need to rebase first and then commit. The purpose of rebase is to make your changes based on the modification of file A.

The root cause is that conflicts will occur in this case, and git cannot determine which version is the final version. If you only use merge, it will directly think that B has changed the A file back.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template