git reports merge conflict with no changes, empty lines (using git-subtree)

后端 未结 2 1564
既然无缘
既然无缘 2021-02-19 01:50

I\'m testing the use of git-subtree to merge a library repo into a bigger project. It seems great in principle. Sometimes when I do a \"git subtree pull\" I get merge conflicts

2条回答
  •  感动是毒
    2021-02-19 02:07

    It's not a solution to your root problem, but rather a mitigation of it. you can use
    git merge -Xignore-space-change to ignore space changes in your commits.

    It's probably a problem with your line endings. you can try a --dry-run alternative in merge (git merge does not have --dry-run option):

    $git merge -Xignore-space-change --no-commit --no-ff $BRANCH

    to see the changes before you actually commit them.

提交回复
热议问题