git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git pull - reporting that I modified files, but I did not

From
JVJay 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.
Next: Max Horn
Message 1 of 2 in “git pull - reporting that I modified files, but I did not”
  1. Jay VeeJan 17, 2013
  2. Max HornJan 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.