Answer the question
In order to leave comments, you need to log in
How to exclude the root .gitignore file from a git repository if it's already in the git index?
How to exclude the root .gitignore file from a git repository if it's already in the git index? (required for specific project needs)
Simply writing .git/info/exclude .gitignore in the file does not help.
Thank you in advance.
Answer the question
In order to leave comments, you need to log in
Just like any other file:git rm .gitignore
This is because the ignore only applies to files not yet tracked. This applies to any file, not just .gitignore. Therefore, adding it to ignore after the fact does not work.
In general, perhaps we have an xy problem here . So maybe you should describe what you want to remove .gitignore for.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question