我正在推动工作以获得正式签收以安装和使用Boost库。我们最近采用了git,我发现默认的Boost安装使用500MB来存储24000个文件。由于git为每个用户复制整个存储库(目前大约35个),这会增加大量的NFS空间使用,并且它似乎会影响git性能。 Boost就像CPAN一样,它不会让我们安装点点滴滴并解决依赖关系。这似乎是全有或全无。
我对git或Boost都没有多少经验,我想知道其他人是如何处理这个问题的。保持Boost摆脱git?每次有新版本时,请仔细修剪Boost目录?使用Boost安装管理器,其存在我不知道?
感谢。
答案 0 :(得分:1)
根据您所说的,听起来您可能会使用.gitignore
文件来解决您的问题。使用.gitignore
文件可以忽略boost库中未更改的部分。您可以在unix中创建.gitignore
文件,如下所示:
touch .gitignore
# or
nano .gitignore
您需要确保.gitignore
文件位于项目目录的顶部,并带有.git
文件夹。获得.gitignore
文件后,您可以将不希望git跟踪的文件和目录路径放在那里:
# This is the titan project gitignore file
# this section includes general files that should be ignored
*.txt
.project
*.csv
# these are general places to ignore in this project
.settings/
# this would let you ignore a directory from boost
boost/
如果每个人的版本都是相同的,并且你们没有编辑它,那么听起来你可以安全地.gitignore
它。
以下是github关于此主题的文档的链接: https://help.github.com/articles/ignoring-files