php - Git won't pick up changes to certain files
Have a very odd and annoying issue with Git/GitHub.
In a certain branch, any file that has the path as
/views/student/index.php won't detect any changes to the files no matter what. Deleting the file, removing all the code, or just making a small edit isn't picked up at all.
We are using Codeigniter v2.2.0 as the framework, if that is of any use.
This is happening through any folder with a file structure like that.
Have tried multiple different software including the GitHub native app and Sourcetree.
There is another branch we have that works fine.
Tried cloning the branch with the issue but it still has the problems on the new branch.
Any ideas that could help would be great :)
Whenever you have a file which seems to be ignore, you quickly can check that with
That will help list the exact
.gitignorereferencing that file.
Massive facepalm moment.
I had index.php in the .gitignore, I needed to have /index.php to ignore only the index.php in the main directory.
If your using SourceTree as you mentioned, change the File Status combo from the Working Copy view to "Show Ignored". It doesn't display ignored or untracked in "Show All".