Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 2

git diff shows differences but git merge don't see them



diff show difference, which are really exists.

But merge refuses to merge them.


How this could be?

common (develop)
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working tree clean

common (develop)
$ git diff develop release/333-test --name-status
D       01_alter_koz_mapping.sql
D       02_fix_remarks_on_dict.sql
D       010_upd_subsystem_ent_docs.sql
D       00_create_user_fb.sql
D       01_insurer_payments.sql
D       logs/20190531-115323.log

common (develop)
$ git merge release/333-test --no-commit
Already up-to-date.



1 Reply
Community Manager
Message 2 of 2

Re: git diff shows differences but git merge don't see them

It's hard to say without having a sample repository to work with. But if I had to guess, it's because the `git diff` form you used did a straight across diff between the state of the repo at `develop` and the state of the repo at `release/333-test`, but the `git merge` you did performed a three-way merge between `develop`, `release/333-test`, and their common ancestor. The three-way merge is smarter in what it can detect and generally ends up at the right answer more often than a simple two-way diff/merge.


I hope that helps!