您可以搜索 tfs 历史记录来查找其中包含特定代码的文件版本吗?
我试图找到一些已添加然后从文件中删除的代码。
我知道该文件已签入 TFS 至少有一段时间,但检查该文件的每个版本将花费比实际需要更长的时间。
是否有办法在 tfs 历史记录中搜索包含特定文本的文件版本?
I'm trying to find some code which was added, then removed from a file.
I know the file was checked into TFS for at least a little while, but going through every version of the file will take longer then it needs to.
Is there anyway to search tfs history for a version of the file containing specific text?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在与 ObjectSharp TFS Guru 交谈时,他建议(通过Twitter):
Speaking with the ObjectSharp TFS Guru he suggested (viaTwitter):
您可以将 TFS 存储库导入 git,然后使用“git pickaxe”(git log -S)搜索存储库中的所有提交数据。
有几种可用的工具,但这个看起来不错:
https://github.com/spraints/git-tfs#readme
然后阅读在 git pickaxe 上,这就是人们所说的“git log”的“-S”选项:https://github.com/spraints/git-tfs#readme
You could import the TFS repository into git and then use the "git pickaxe" (git log -S) to search all commit data in the repository.
There are several available tools, but this one looks good:
https://github.com/spraints/git-tfs#readme
And then read up on git pickaxe, which is what people call the "-S" option to "git log": https://github.com/spraints/git-tfs#readme