I am facing issues when doing git pull origin master
I have some files which have local config settings and are different from origin
I have marked them as untracked by code->
git update-index --assume-unchanged html/index.php
Now as long as the remote index.php file does not change I can easily do git pull
, but when index.php file changes and I do
git pull origin master
I get following error
branch master -> FETCH_HEAD
d532f8d..d01836e master -> origin/master
error: Your local changes to the following files would be overwritten by
merge:
html/index.php
Please, commit your changes or stash them before you can merge.
Aborting
Whenever I face this issue I have to run command
git update-index --no-assume-unchanged [filepath/filename]
then do git pull , and then update that config file with my changes and again run
git update-index --assume-unchanged html/index.php
I do not need to take the remote config file changes in my local, so updating those files is not necessary I cannot change the remote file,so what can I do locally that I do not face an issue for these config files being updated in remote