search

Home  >  Q&A  >  body text

git - source merge branch

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:

高洛峰高洛峰2794 days ago518

reply all(1)I'll reply

  • 阿神

    阿神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.

    reply
    0
  • Cancelreply