git pull - reporting that I modified files, but I did not
- From
- Jay Vee <jvsrvcs@gmail.com>
- Date
- Jan 17, 2013, 19:29 UTC
- Message-ID
- <CADq_mb-k8mP6PAsPciYEkx6fvFNdGK+ejsFEZ4nCJVcUQ6odGg@mail.gmail.com>
When I do a git pull, I am getting a messages that changes to local files would be overwritten by a merge, but I have not changed these files locally at all, I have not opened them in my IDE. This happens every now and then.
1) Why does this happen?
2) How do I prevent this from happening in the future?
3) How do I get out of this state so that I can do a git pull and rebuild my code?
--- In other instances, when I do a git pull (not getting the message above, I will see something like: M src/MyClass.java <= a file that I did not touch or modify D src/AnotherClass.java <= a file that I did not delete or touch M src/MyModifiedClass.java <= a file that I indeed modified for which in the pull there are no merge conflicts.
and the pull is successful, (then I want to push my changes), but I did not change either of the above two files
If I see the above, am I OK to push? My thinking is that git thinks I changed 'src/MyClass.java' and if I do a diff there are differences, but I do not want to push because I NEVER TOUCHED THAT FILE IN ANY WAY.
What is going on here? Maybe this is normal and I simply do not understand correctly.
What is happening? I would expect to see only line items 'M' and 'D' for files that I personally have modified and deleted. If I push at this point, will I overwrite changes in the repo pushed by others and muck things up?
thanks
J.V.