I have a config.php file with my configuration (for example, the MySQL credentials). Those credentials are different in my local version and in the production server (in the local MySQL, I use user root, and in the production server, the user max). I want to manage it with git. I need to push and pull every file but not the config.php. I found this command :
git update-index --assume-unchanged config.php
but can I change the remote config.php file (for example, if I change the remote password)? And how to change the local config.php file without affecting the remote? Should I put this file to the .gitignore?