Prevent merging a file from master with Git

后端 未结 2 1094
执念已碎
执念已碎 2021-01-01 04:17

In another question it is recommended to use .gitattributes in order to keep the file tracked but not merged in different branch, but my use case below seems no

2条回答
  •  感情败类
    2021-01-01 04:34

    The custom merge driver mentioned by carleeto is illustrated in "Tell git not to merge binary files but to choose":

    You can declare in a .gitattributes file the kind of merge you want:

    echo yourConfigFile merge=keepMine > parentDirectory\.gitattributes
    

提交回复
热议问题