I have two branches in my git repo, one that is pushed to the PROD server and on that is used for DEV (debug settings, web server on localhost, etc). The apache instance on the PROD server is has all the RewriteRules, etc in Directory directives in a conf file while in the DEV branch I have them in .htaccess files.
My question is that how do I keep the .htaccess files in the DEV branch but stop them from being merged to the production branch when I want to merge the two branches and push changes?
EDIT: I have used .gitattributes to ignore the specific conf files when merging, it's just the .htaccess files I need help with
I got the same problem and using .gitignore it was resolved just adding
.htaccess