I am trying to have the same config file in two different branches. I want to have the file in develop branch under revision control and on the production branch out of the revision control. So I am trying what is suggested here.
http://cogniton-mind.tumblr.com/post/63560840467/howto-gitignore-for-different-branches-update
I have the file config/config.php git rm and then added it on my .gitignore I add and commit and push to branch production. I put a copy of the file back to the original place and on my git status I see,as expected, that nothing need to be commited I checkout my develop branch and make some changes on that file. Add, commit and push to develop. I checkout production I then try to merge develop to production and I get the following.
CONFLICT (modify/delete): config/config.php deleted in HEAD and modified in develop. Version develop of config/config.php left in tree.
Is there to avoid this and have the file in develop under revision control and on production not in revision control?