(Have posted this question in SO already: http://stackoverflow.com/questions/10779235/prevent-merging-a-file-from-master-with-git)
I want to a file that will not be merged ever between branches, e.g. config.php What I found that by using "config.php merge=ours" in the .gitattributes does not work as expected, but `git merge master --strategy=ours` works, any reason? Command history: mkdir git > cd git > git init > echo "B" > b.txt > git add b.txt > git commit -m 'Initial commit' > > echo "b.txt merge=ours" > .gitattributes > git add .gitattributes > git commit -m 'Ignore b.txt' > > git checkout -b test # Create a branch > git checkout master # Back to master and make change > echo "Only in master" > b.txt > git commit -a -m 'In master' > git checkout test > git merge master # The change in b.txt is being merged... Any idea, or it is a bug? Thanks. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/VOODkPs-nEwJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.