Search code examples
gitgitignorebower

Should bower_components be gitignored?


Would it be good practice to keep only the bower.json file and gitignore the whole bower_components directory?


Solution

  • The official Bower page stated:

    N.B. If you aren't authoring a package that is intended to be consumed by others (e.g., you're building a web app), you should always check installed packages into source control.

    Make sure to check out the link in the quote, it discusses some pro and cons. The main pro it mentions is that checking them in ensures that your dependencies are always available, as long as your repository is available. No matter what happens to Bower, GitHub or whatever else would be needed otherwise.