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/admin/index.php,/views/teacher/index.php,/views/parents/index.php,/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 :

git check-ignore -v -- /path/to/yourFile

That will help list the exact.gitignore referencing 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".

People are also looking for solutions to the problem: php - codeigniter send id and get database values without refresh


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.