0

This is driving me insane, so any help is appreciated.

I have a file that I'm trying to commit & push to gitlab. When I modify it, it doesn't show up as changed in git status, and using git add does nothing (literally no message, nothing). I did some testing, and it turns out that any files that were created before my last commit don't show up when modified, but files that were added in my last commit do show up when modified.

I've tried telling git not to ignore changes to the file (git update-index --no-assume-unchanged path/to/file) and removing the cached file, as suggested here. The file definitely isn't in my .gitignore.

What gives?

Update: I totally removed the repo from my system, cloned it again, and then added my files back. It still doesn't work, same problem as before. git add provides no output when adding that file.

Update numero dos: Solved the problem! I had to remove the bad files from the repo, then add them back. It works now!

9yz
  • 3
  • 3
  • 3
    Showing the actual output (cut and paste from terminal window) for `git add` might be helpful. Also, while the file isn't listed in `.gitignore`, it might be listed elsewhere: try `git check-ignore -v path/to/file` to find out. – torek Aug 08 '21 at 11:27
  • `git add`ing the file literally does nothing. There's no output at all. Same thing for `git check-ignore` (but doing it on a file in .gitignore does say that it's being ignored). – 9yz Aug 08 '21 at 17:15
  • Do you have files with the same name but different case letters? Case-insensitive filesystems can cause weird behaviors like this. – a544jh Aug 08 '21 at 17:59
  • Nope. Out of habit I pretty much never use spaces or caps in file/folder names. – 9yz Aug 08 '21 at 18:08

0 Answers0