This has happened to me a couple times now, so I wondered what I could possibly be doing to cause it.
My team has a TFS git repo. I am working on a branch, say my-branch. I'm modifying some R scripts, and commit frequently. A git status shows something like
Your branch is up-to-date with 'origin/my-branch'.
Changes not staged for commit:
modified: path/to/script.R
However, sometimes, even when I'm just working on this one script, a git status suddenly shows this, where every file in the repo is shown as modified even though I've only been working on one thing:
Your branch is up-to-date with 'origin/my-branch'.
Changes not staged for commit:
modified: other/path/to/scripts.cpp
modified: path/to/script.R
modified: path/to/somethingElse.txt
modified: path/toward/otherStuff.csv
modified: path/toward/Wiki
modified: really/every/file
If I run a git diff on these, there doesn't appear to be any difference. And I know I can just revert to the previous commit, but then I lose the work I just did. Is there anything I could be doing to cause this? It's really freaky.