Maybe my Googling skills are lacking but this seems like a question that should give me back thousands of hits and yet, I can't find a straight answer.
Simple as this:
I do constant pushes to github to share with a remote developer. We both have
# Runtime data
# Directory for instrumented libs generated by jscoverage/JSCover
# Coverage directory used by tools like istanbul
# nyc test coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing- task-files)
# node-waf configuration
# Compiled binary addons (http://nodejs.org/api/addons.html)
# Dependency directories
# Optional npm cache directory
# Optional REPL history
If you want to ignore folder, you need a trailing slash:
Then check if the rule apply with
git check-ignore -v (the
-v is important)
git check-ignore -v -- bower_components/afile
If that does not apply, then remove the content of that folder from the history of that repo:
git rm --cached -r -- bower_components/ git add . git commit -m "Remove bower_components folder"
.gitignore rule will take effect immediatly.