jedi
jedi

Reputation: 2198

.gitignore not ignoring .rubocop.yml file

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?

project

app/ config/ .rubocop.yml

.gitignore

.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

Answers (1)

akmin04
akmin04

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

Related Questions