I just tried using .gitattributes for the first time. I figure I must be doing something wrong because it is not working as I thought the purpose of using the merge=ours
attribute was intended for (?).
An example of my usage:
I have two branches; one is the "master" and the other is "GCE-Site". There are files on the "GCE-Site" branch that have different settings that also exists on the "master" branch that I do not want merging into the "master" [or other branches].
On both branches, I have a .gitattributes
containing the following rules:
README.md merge=ours
config.php merge=ours
.gitattributes merge=ours
.gitignore merge=ours
.cache/ merge=ours
All the files needing the rules are on the root level plus everything above the .cache/ folder. When I do a git merge GCE-Site
, all files still merge into the master when I don't want that.
Is there something I am missing? Your help is greatly appreciated. Thnx
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…