git - 应该忽略 bower_components 吗?

标签 git gitignore bower

仅保留 bower.json 文件并忽略整个 bower_components 目录是否是一种好的做法?

最佳答案

official Bower page声明:

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.

请务必查看引用中的链接,它讨论了一些优缺点。它提到的主要优点是 checkin 它们可确保您的依赖项始终可用,只要您的存储库可用。无论 Bower、GitHub 或其他任何需要的东西发生了什么。

关于git - 应该忽略 bower_components 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22327758/

相关文章:

javascript - 赫斯基 5 .huskey gitignore

git - 如何在不影响其他工作副本的情况下 .gitignore 和删除已提交的文件?

node.js - 为所有项目的 "Global"bower_components 文件夹创建工作流?

javascript - 如何指定bower-install的目标目录?

angularjs - 错误 : [$injector:nomod] Module 'ui.bootstrap' is not available! 您拼写错误 [...]

git - merge develop 分支到 master

svn - 有没有办法将 "persistently"与 SVN 同步 git 存储库?

git - 有没有办法从本地 git 工作树中删除所有被忽略的文件?

git - 我可以使用 .gitignore_global 忽略多个存储库中所有用户的文件吗?

git - 如何在 Refactor > Rename 上避免 PhpStorm 暂存文件