I have changed some files on my local machine, pushed them to a remote repository, and now I’m trying to pull the changes to the server and I get the message;
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
So What I simply did that …..
Moyens-MBP:~ moyen$ git checkout wp-content/plugins/pluginname/file.php
Moyens-MBP:~ moyen$ git commit -m “merged”
Moyens-MBP:~ moyen$ git pull
Moyens-MBP:~ moyen$ git push origin master
and this makes override the local file with the remote one (git checkout filepath) and deploys the other changes.