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

Bug! Git merge also fails with a wrong error message

From
YGYves Goergen <nospam.list@unclassified.de>
Date
Jan 13, 2012, 17:37 UTC
Message-ID
<loom.20120113T181805-423@post.gmane.org>
In-Reply-To
<loom.20120112T193624-86@post.gmane.org>
I have updates to this issue.

After asking several people who didn't believe me, after all I could pass all checks to ensure that the file in question really is tracked, despite the error message telling it is not. (The file has a history, it is part of the branch, git status behaves as expected when I rename it, and so on.)

I had found a workaround hack to access my data again: I have cloned the repo into another directory, then switched to the branch in there (it actually worked) and used BeyondCompare to manually(!) switch my original repo and working directory by copying some (not all) files in .git and all differences in the working directory.

That worked fine at first, I could commit to that branch.

Today I wanted to merge that branch into master again. Switching to master was fine, but merging from the form-refactoring branch now fails for the very same "reason":

----- git.exe merge --no-commit form-refactoring

error: The following untracked working tree files would be overwritten by merge: Form1.Designer.cs Please move or remove them before you can merge. Aborting -----

Again, that file is NOT untracked. Git just fails processing its own data. I cannot move that file because it is part of the other branch and must be merged now.

Am I now supposed to checkout both branches and do the merge somehow on my own?

Maybe it's not a good idea to use branching and then rename, create and delete files on that branch, as switching and merging fail completely afterwards. And in the end, maybe Git isn't all that good and some of the alternatives with real file tracking should be preferred.

I, for one, have lost a great amount of trust in Git in the last two days.

(Sorry for the formatting mess, but the stupid Gmane post editor forced me to do that or it wouldn't accept my message... Don't you have a real mailing list, if there's no web forum??)

Previous: Yves GoergenNext: Jeff King
Message 15 of 27 in “Bug? Git checkout fails with a wrong error message”
  1. Yves GoergenJan 12, 2012
  2. Holger HellmuthJan 13, 2012
  3. Yves GoergenJan 13, 2012
  4. Holger HellmuthJan 13, 2012
  5. Yves GoergenJan 15, 2012
  6. Holger HellmuthJan 16, 2012
  7. Yves GoergenJan 16, 2012
  8. Jeff KingJan 16, 2012
  9. Yves GoergenJan 16, 2012
  10. Jeff KingJan 16, 2012
  11. Yves GoergenJan 17, 2012
  12. Thomas RastJan 16, 2012
  13. Erik Faye-LundJan 16, 2012
  14. Yves GoergenJan 16, 2012
  15. Bug! Git merge also fails with a wrong error messageYves Goergen, Jan 13, 2012
  16. Jeff KingJan 13, 2012
  17. Yves GoergenJan 13, 2012
  18. Jeff KingJan 13, 2012
  19. Yves GoergenJan 13, 2012
  20. Carlos Martín NietoJan 13, 2012
  21. Yves GoergenJan 13, 2012
  22. Jakub NarebskiJan 13, 2012
  23. Yves GoergenJan 15, 2012
  24. Jakub NarebskiJan 15, 2012
  25. Thomas RastJan 17, 2012
  26. Yves GoergenJan 17, 2012
  27. Thomas RastJan 19, 2012

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.