Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git doesn't track files

Tags:

git

So this is kind of weird. I have files within a folder, within the main directory, and Git doesn't see them. So when I git status I don't see my dear updated files.

I don't have a .gitignore, I've tried git config core.excludesfile but it rendered no output, I've checked REPO/.git/config and REPO/.git/info/exclude, nothing in there, git add -f was no hero, git check-ignore is not a Git command (might be my Git version).

I cloned my repo locally but still the same problem applied to the new repo. I've checked these answers: Untracked files not shown in git status, Git is ignoring files that aren't in .gitignore, Git is not detecting a file and is not in .gitignore, Show ignored files in git but no solution provided in there worked for me.

But if I rename the folder then git status output it. So does anybody know where I should look for ? I'm not even asking why there's so many ways to ignore files because I know I'll end up with more questions than answers, but hell Git you're supposed to make my life easier !

like image 752
theFreedomBanana Avatar asked Jun 25 '26 06:06

theFreedomBanana


1 Answers

Check:

  • ~/.gitignore
  • The .gitignore within the directory itself and any parent directories (not just the repository root)
  • ~/.config/git/ignore
  • ~/.gitconfig for an extra excludesFile entry
  • ~/.config/git/config, again looking for an excludesFile entry
  • .git/info/exclude
  • .git/config, again for excludesFile
  • /etc/gitconfig, again for excludesFile

You should also look at the output of git status --ignored to make sure that ignoring is what's going on.

like image 59
Borealid Avatar answered Jun 28 '26 03:06

Borealid