If there are some configuration files on the system that have been configured on the server and then later developed and then added some new configuration items,
A code violation occurs when this profile is published:
Error:your local changes to the following files would is overwritten by merge:
protected/config/main.php
Please, commit your changes or stash them before you can merge.
If you want to keep the changes made on the production server, simply incorporate the new configuration items, the processing method is as follows:
git stash ///Hide local changes first
git pull
git stash pop /resume stash content also deleted
You can then use git diff-w + filename to confirm the automatic merging of the code.
Conversely, if you want to completely overwrite the local working version with the files in the code base. The method is as follows:
git reset--hard
git pull
Where git reset is for version, and if you want to rollback local modifications to the file, use
git checkout head File/to/restore