The operation is like this:
Develop A: Change the A file code. commit, push.
Develop B: Change the B file code. commit, pull, merge.
Both operations are performed in the sourceTree graphical interface.
In rare cases, old versions will be merged during merge. See picture below.
sourceTree version: v2.1.
git version: 2.6.4.
A file changes:
merge:
阿神2017-05-02 09:36:38
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.