3

I often get conflicts when merging branches that look like this:

<<<<<<< HEAD
    private readonly IAdminService _adminService;

=======
    private readonly IAdminService _adminService;

>>>>>>> refs/remotes/origin/master

There is no visible difference. What would cause github to view this as a conflict?

mrb398
  • 1,277
  • 4
  • 24
  • 32

1 Answers1

4

Usually this is invoked by white spaces character, such as tab, space. you can set you editor to show these characters.Also git diff provides options to ignore those character.

--ignore-space-at-eol

Ignore changes in whitespace at EOL.

-b

--ignore-space-change

Ignore changes in amount of whitespace. This ignores whitespace at line end, and considers all other sequences of one or more whitespace characters to be equivalent.

-w

--ignore-all-space

Ignore whitespace when comparing lines. This ignores differences even > if one line has whitespace where the other line has none.

gzh
  • 3,507
  • 2
  • 19
  • 23