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

后端 未结 2 1573
既然无缘
既然无缘 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.

    0 讨论(0)
  • 2021-02-19 02:11

    Use submodules to hold shared work. There is git-slave if you do a lot of work with shared and non-shared projects that need to be coordinated. Your line ending storage disparity will disappear.

    0 讨论(0)
提交回复
热议问题