1

I'm working with a tool that from model generates some other files (e.g. SQL files, sample REST requests, ...)

The challenge is as I see those files as deleted as well as untracked.

I'm just guessing, that those files are deleted and recreated by the tool and somehow git is not able to identify that.

What I do is I add (git add) those untracked files, git somehow rechecks and some files are changed to modified/not modified. Some files will stay deleted and untracked at the same time, so I have to repeat the addition as many times as there is that inconsistency. At the end it always results in expected result - all regenerated files are modified or not modified...

I'm wondering whether there is a way to help git with this, I cannot change the tool...

I read:

...but it's not my case - there is nothing like additional/changed whitespaces or case of filename (I'm on Windows). As it is generated by tool, it is pretty much the same all the time.

Betlista
  • 10,327
  • 13
  • 69
  • 110
  • As the file shows as deleted and untracked, there is most likely a problem with the filenames and/or paths. Apart from case-issues and whitespaces, I think of two additional possibilities: a) Special characters (unsupported by the OS or Git) that get interpreted differently by Windows vs. Git. b) Long paths which somehow interfere. You can set `core.longpaths` to *true* and try again to see if this could be the problem. – Matt Jun 03 '21 at 06:52
  • Thanks for a tip, but that didn't help. Longest absolute path in my repo is 207 characters long.... As this is code, there a ASCII characters only in filenames... – Betlista Jun 03 '21 at 10:50

0 Answers0