0

I have a git merge with many conflicts. For one individual file, I'd like to re-merge it while ignoring line endings.

Put another way: I'd like to run git checkout -m file with the behavior of git merge -Xignore-space-at-eol. Is this possible?

Kevin Smyth
  • 1,892
  • 21
  • 22
  • One way would be to run `git merge -Xignore-space-at-eol`, then commit the result, `reset --hard` and merge again. Then I could just `git checkout` files from the first merge during conflict resolution. But usually I realize I want a file merged with `-Xignore-space-at-eol` halfway through conflict resolution. – Kevin Smyth Nov 27 '19 at 14:36
  • 1
    I think the question is not clear. I would ask you: Do you need to keep the file i question with different EOL formats on each branch? That's something you should avoid because otherwise you will be getting conflicts _every single time you try to merge when there is even a small change on the file on the other branch_. – eftshift0 Nov 27 '19 at 16:14
  • Whatever `git merge -Xignore-space-at-eol` does is fine. It is easy to convert EOLs after conflict resolution. – Kevin Smyth Dec 02 '19 at 14:16

0 Answers0