I'm having a git problem where I want to merge a branch into master but it's refusing to merge because it thinks I have local changes to a file. Doing status shows no changes and diffing the files produces nothing. Here's the terminal output:
$ git checkout ProductsAndContents
Switched to branch 'ProductsAndContents'
$ git status
# On branch ProductsAndContents
nothing to commit (working directory clean)
$ git checkout master
Switched to branch 'master'
$ git status
# On branch master
nothing to commit (working directory clean)
$ git merge ProductsAndContents
error: Your local changes to the following files would be overwritten by merge:
tests/unit/src/models/BrandTests.js
Please, commit your changes or stash them before you can merge.
Aborting
Any help or suggestions would be most appreciated!
Thanks to Andrew Myers' comment on my initial question, I discovered setting core.trustctime
to false
solved the problem.
git config core.trustctime false
Something about mismatching inode change times. I'm guessing this is because the repo is sitting on a fileshare on a machine with a different file system from the one I'm using.
Thanks for all the suggestions!
Well, if you're confident you won't loose any work, try the following:
rm tests/unit/src/models/BrandTests.js
git checkout -- tests/unit/src/models/BrandTests.js
That should reset any mechanism that made it think it had changes. If it doesn't work, have others that might.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With