Page 4 of his slides包含以下要点. . .
But not for…
- Tracking file permissions and ownership
- Tracking individual files with separate history
- Making things painful
. . .这是他说的,大概4分钟后：
It is not optimized for any kind of metadata about the files. It does not, it does not, track file permissions or file ownership. That is not its job. It’s managing source files, and sources don’t have owners, sources don’t have permissions. Sources are used in recipes to build the real thing that you are going to deploy. So git does not have technology about that. People have tried to build structures on top of it to do that, with some degree of success, but really let’s look at basically what git is meant for and not what people are building on top of it.
It’s also not meant for tracking individual files with unrelated or separate history. For example, you may think, “Oh, I really like this. I want to track all my et cetera with it. But et cetera is really a bunch of separate, unrelated files. You wouldn’t be doing branching and merging. . . add this change to that change and eventually want to back out both of them at the same time. It doesn’t really work that way. So it’s not good for individual files.
I still use RCS to track individual files in my /etc. It’s really fast, it’s cheap, and I can get back to the data I need to. It’s also not optimized for making things painful. Ok? It’s designed to be easy and stuff.
就个人而言,我没有计划用git跟踪我的/ etc,但我最近开始使用git来跟踪/ var / named(BIND配置).鉴于Randal上面要说的,我应该为此停止使用git吗？有没有缺点,我不期待的问题,一个陷阱？到目前为止,一切都按照我的预期正常工作,我没有遇到任何问题,但由于上面的警告,我实际上犹豫是否开始使用git来跟踪/ var / named.
具体来说,我想知道如何使用git来跟踪/ var / named,但我欢迎使用git跟踪类似目录的最佳实践答案.
就个人而言,我使用etckeeper在我的服务器上使用git后端跟踪/ etc.效果很好.当从Ubuntu的apt repo安装时,它带有很好的钩子到apt,所以它会自动启动与每个新的软件包安装一致的提交.非常方便.