Whilst doing a git pull command that always worked, you see a new error:
username@host application]$ git pull Updating 4a81dc8..fe35c1a error: Your local changes to the following files would be overwritten by merge: public/token.json Please, commit your changes or stash them before you can merge. Aborting
In this particular case a file called ‘public/token.json’ was generated by a Google API server, so it appeared out of the blue. A quick way to get rid of the issue is:
git checkout public/token.json
That command will discard the changes for the file
2 thoughts on “error: Your local changes to the following files would be overwritten by merge”
Hello how are you?
Have you tried using git stash on your server?
Hi @Diego,
Thank you so much for your reply. Indeed Git Stash could also work. Would you say this is the preferred method?