I have .gitignore as
index.php
protected/config/
I wanted to ignore only index.php in root but git is ignoring all files with index.php in sub-folders as well.
How I can modify .gitignore to ignore only specific index.php file and not all files with name index.php
Use
/index.phpin your.gitignore