If you have a file (such as a database.php file) that has different contents locally than what needs to
Step 1: Run git update-index command
git update-index --assume-unchanged config/database.php
Now, any changes that you make to this file will not change the git repo (allowing you to have Local and Production Versions of a File in Git Repository).
What if I want to undo git update-index –assume-unchanged?
If you would like to commit an actual change of that file to the git repo, run the following command (it i the opposite of –assume-unchanged).
git update-index --no-assume-unchanged config/database.php