Reputation: 2198
I have just added .rubocop.yml file to my project and added it to .gitignore
file but when I do git status
it appears as modified. I have never added this file to my repository. Why is .gitignore
not ignoring this file?
app/ config/ .rubocop.yml
.rubocop.yml
Other files are ignored fine, for example, I also tried adding tags
file to the root of the project and adding it to .gitignore and it works.
Why is .gitignore
not ignoring .rubocop.yml
file?
Upvotes: 4
Views: 3271
Reputation: 697
Commit your project first, then do git rm --cached .rubocop.yml
. It shouldn't be included in your repository the next time you commit
Upvotes: 12