Yesterday I started having the strangest issue with my local git repository. If I make any local changes, they don't show up in "git status". I usually use visual studio (VS 2017 Professional) to look at changes and do comparisons, and any changes I make do not appear here either.
When I attempted a git pull, I got the error message that "Your local changes to the following files would be overwritten by merge:".. "Please commit your changes or stash them before you merge".
I have tried doing a reset to head / stash "changes" / deleting the branch and pulling it down again. This looks very similar to my issue but none of the solutions offered worked for me. When I tried git reset --hard origin/master I got the error:
error: Entry '.gitignore' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'origin/master'.
I tried following suggestions here and again, no luck.
EDIT: The main issue here right now is that any changes I make are now showing up. I have been able to pull latest changes by renaming the file git thought had been edited and later removing it (see here), but my local changes are still ignored. I looked at my .gitignore and cannot find anything that would indicate all files in my project should be ignored..
I removed everything from my .gitignore file and when I did this all the files I want to ignore appear - i.e. dlls etc. showed up as changed but all the files I want to include - i.e. all code files still do not appear in my list!! I have also tried undoing all files that skip-worktree was applied to in case this had somehow happened.
I have no idea what's happened here. I have never had an issue like this before and have searched online for a similar issue and cannot find a solution.
Any suggestions on what else to try would be greatly appreciated!