TFS 2010如何限制变更集的数量
是否可以限制仅保留最后 N 个版本的变更集数量?为了避免数据库无限增长,设置“仅保留最后一个 X 版本并丢弃旧版本”可能会很有用(我有一些项目,2 年前的变更集完全无用!)
Is it possible to limit the number of changesets keeping only the last Nth versions ? To avoid infinite growth of the database it could be useful to set "keep only the last X version and discard the older" (I have some projects that the changesets of 2 years ago are completely useless!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不会推荐这种方法,你永远不知道旧版本的文件何时会有用。代码的寿命比你想象的要长得多,我维护着许多系统,其中仍然维护着十多年前的代码。
TFS 在存储代码(增量和压缩的混合)方面非常高效,有关详细信息,请阅读 Bill Heys 关于该主题的博客。
I wouldn't recommend that approach, you never know when having the old version of a file is going to be useful. Code lives for a lot longer than you think and I look after numerous systems where code from over a decade ago is still maintained.
TFS is pretty efficient at storing code (a mixture of deltas and compression) for more information read Bill Heys's blog on the subject.
您可以将
tf destroy
与/stopat:X
结合使用,其中X
代表它将停止删除的变更集 ID。TF Destroy 的参考位于此处。
< br>确保您知道自己在做什么,最好进行测试:
tf destroy
是一张单向票,任何操作都无法撤消。You can use
tf destroy
with/stopat:X
, whereX
represends the changeset ID it 'll stop deleting.The ref to TF Destroy is here.
Ensure you know what you 're doing, preferably with tests:
tf destroy
is a one-way ticket, any action can't be undone.