How do I tell Git to ignore a specific filename only in the repository's top level? [duplicate]
Add this to your .gitignore
(in the root folder):
/index.html
The leading /
makes git use an absolute path (relative to the current .gitignore
location), whereas all other lines are just treated as some kind of wildcard.