How do you get a Git merge to ignore conflicts in selected files?

This question already has an answer here:

  • Resolve Git merge conflicts in favor of their changes during a pull 8 answers

  • You can use:

    git checkout --theirs .
    

    To accept all the upstream changes.

    Or if you know that only for some files you would like to use the upstream version apply the checkout only for these files, for the rest of them you can resolve the conflicts manually. Eg.

    git checkout --theirs frmNewShop.lfm frmCliCustsBrowser.lfm  
    

    I would say that configuration files do not belong being committed in GIT to start with.

    However, to keep "your" changes you can follow: https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b#.r3hadlpt5

    链接地址: http://www.djcxy.com/p/45030.html

    上一篇: git中“解析使用他们”的默认行为是什么?

    下一篇: 你如何获得Git合并来忽略选定文件中的冲突?