fbpx

error: Your local changes to the following files would be overwritten by merge

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

Reference:
https://stackoverflow.com/questions/15745045/how-do-i-resolve-git-saying-commit-your-changes-or-stash-them-before-you-can-me

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top