I\'ve created git repository, added code and pushed it to GitHub.
Then locally, I\'ve edited the file Eila.Analyser/Program.cs, that was added to GitHu
I had the same issue but realised my issue was the ignore at top level. I ignored the .php files so anything that was of .php could not be changed
PROBELM (In my case)
Performing a git checkout -b <branch_name> had no effect and my folder and files in that branch were still not visible locally, though they are on our gitlab server.
SOLUTION
Copied the SHA hash of last commit in that branch, then locally:
git checkout -b <branch_name> #SHA Hash
Now I see the expected sub-directories and files.
For me the solution was
Renaming the untracked folder
My case was exactly what Timothy mentioned. I had a subfolder that was also a git repo. I removed the git from the subfolder but the 'parent git' stopped tracking it. Renaming the folder via windows explorer didn't fix the issue but renaming it through git did the job. So, I did '$ git mv folder-name folder-name-temp'.. than renamed back to its original name :)
For me, the problem was that I had a filename in my .gitignore file which did not exist. Removing this invalid filename from .gitignore solved the problem. Also, I deleted all the .gitignore files from subdirectories and only kept the top-level .gitignore file.
Try running git update-index --really-refresh.
I did have similar problems on Windows and that solves it.
You should also check the core.ignoreStat option with git config.