Evita la fusión de un archivo del maestro con Git

Enotra pregunta se recomienda usar.gitattributes para mantener el archivo rastreado pero no fusionado en una rama diferente, pero mi caso de uso a continuación parece no funcionar ...

mkdir git
cd git
git init
echo "B" > b.txt
git add b.txt 
git commit -m 'Initial commit'

echo "b.txt merge=keepMine" > .gitattributes
git add .gitattributes 
git config merge.keepMine.name "always keep mine during merge"
git config merge.keepMine.driver "keepMine.sh %O %A %B"
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...

¿Alguna idea? Gracias..

Respuestas a la pregunta(2)

Su respuesta a la pregunta