.gitignore don't Hide File
The .gitignore
file does not affect files that are already checked in to the repository. You will have to do two things:
- delete sidebars.auto.js
- add it to .gitignore
Once both changes are committed, it won't show up in Git any more, even if the file exists on the file system.
From: stackoverflow.com