I'm trying to bring commits from master
which fixed a ton of newline issues into a feature branch without having to manually deal with all the conflicts induced by those newline changes.
We made a few commits in the master
branch to fix some messed up newline characters.
These commits touched many files in the repository.
Now I'd like to bring those changes into a feature branch myfeature
which has its own commits apart from what exist in master. If we just do
$ git checkout myfeature
$ git merge master
we get conflicts because Git thinks that every line in master is different from every line in myfeature
, which is true. If we try to use
$ git merge -s recursive -Xignore-space-at-eol master
as described in this SO question, Git will use the newlines from myfeature
for any line where there were no substantial changes in master
, which is the opposite from what I want.
Is there a way to merge master
into myfeature
getting the updated newlines but without having to manage conflicts manually?