I am using git on Windows 7 via msysgit. An issue that has been causing me a lot of grief lately is that as soon as I switch to certain branches, git thinks that some files have been changed and then I can do nothing to make it stop thinking those files have changed.
The steps to reproduce in my case (which might not be relevant to everybody) are as follows:
- Checkout the master branch.
- Checkout the pristine-3.7 branch.
- Checkout the pristine-3.8 branch.
- Checkout the pristine-3.9 branch.
At this point, git starts to assume that files have changed.
For example, here's a screenshot of a git diff output.
Here's the diff output for the same file using Beyond Compare in Hex mode.
And finally, the git status output!
What's going on?
Update to the question:
A possible solution is to commit the changes locally and then to delete that commit without putting the changes in the commit back into the working state. How is that done?