I have a server. My web project is hosted in GitHub. I made a cronjob in my server to pull changes from GitHub repository. But, as there is database user, password information, so I put fake user and password in GitHub repo pages. I make a script and put in the server that changes the database name and password of the file where use database user and password. The scripts run after each pulling.
But, problem is when there is local changes available git don't support pulling from remote.
I use git pull origin master
that results
* branch master -> FETCH_HEAD
5aef90a..f0ef960 master -> origin/master
Updating 5aef90a..f0ef960
error: Your local changes to the following files would be overwritten by merge:
README.md
Please, commit your changes or stash them before you can merge.
Aborting
Now what can I do so that git ignore local changes?
Edit 1
suppose I have a file connection.php
that have the fake password and user. I want to ignore that file changes.