TFS 2010 和未修改文件的签入
是否可以仅签入包含 Team Foundation Server 修改的文件?我的意思是有一个选项可以在某处激活它吗?
当一家外包公司向我们发送了近一百个源代码文件并且我只想签入修改后的文件时,我需要它。
Is it possible to check-in only files that contain modification with Team Foundation Server? I mean is there an option to activate this somewhere?
I need it when an outsourcing company send us almost an hundred source code files and I want to check in only the modified ones.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
当您执行签入时,Team Foundation Server 将不会接受变更集中未修改的项目,但变更集的其余部分将会成功。如果所有文件均未修改,您将收到错误,并且您的变更集将不会被提交。因此,如果您只是担心您的历史记录因实际上并未更改内容的更改而变得混乱,那么 TFS 将为您解决这个问题。
然而,如果有大量未完成的更改实际上没有编辑,这可能会令人讨厌。如果您只想查看出于代码审查或一般理智目的而实际修改的内容,则 TFS Power Tools 包含
tfpt
命令,该命令具有“撤消未更改”功能将撤消对未修改文件的签出。undo unchanged 命令具有以下用法:
例如,以下命令将对 TeamProject 进行递归获取,提供具有冗余更改的文件列表,然后提示用户是否要撤消它们:
When you perform a check in, Team Foundation Server will not accept items in your changeset that are unmodified, however the rest of the changeset will succeed. If all files are unmodified, you'll get an error and your changeset will not be committed. So if you're just worried about cluttering your history with changes that didn't actually change the content, then TFS will take care of this for you.
However, it can be obnoxious to have a lot of pending changes that don't actually have edits. If what you want to do is only see what's actually modified for code review or just general sanity purposes, the TFS Power Tools contain the
tfpt
command, which has an "Undo Unchanged" feature that will undo the check outs on unmodified files.The undo unchanged command has the following usage:
For example, the following command will do a recursive get on
TeamProject
, provide a list of files with redundant changes and then prompt the user if they want to undo them:TFS 在签入期间忽略未修改的文件。
但是,如果您想在签入之前查看哪些文件未修改,您可以执行以下操作(仔细):
所有未更改文件的锁定将被释放,只将已更改的文件保留在待签入列表中。
但是要非常小心按下哪个按钮!
TFS ignores unmodified files during the checkin.
However, if you want to see what files are unmodifed before you check in, you can do this (carefully):
Locks on all unchanged files will be released, leaving only the changed files in your pending checkin list.
But be very very careful which button you press!
默认情况下,TFS 只会签入已修改的文件,事实上我认为不可能签入*未*修改的文件。如果您使用未经修改的命令行并且未签入的文件将被记录。
默认情况下会比较校验和以避免上传文件。
By default TFS will only check in files that are modified, in fact I don't think it is possible to check in *un*modified files. If you use the command line unmodified and not checked in files will be recorded.
By default checksums are compared to avoid uploading files.
我不确定是否有办法在 Visual Studio 中执行此操作。您可能想尝试使用 Beyond Compare 之类的工具来比较文件夹以找出哪些文件已更改,然后只需检查这些文件即可。 Beyond Compare 还与 Visual Studio 具有出色的集成。
超越比较
I'm not sure that there's a way to do this within Visual Studio. You might want to try a tool like Beyond Compare to compare the folders to find out which files have changed, then just check out those files. Beyond Compare also has excellent integration with Visual Studio.
Beyond Compare
在解决方案资源管理器中,您需要右键单击“文件”或“文件夹”,然后单击“将文件添加到源代码管理”。这是使用 VS 2015。
In Solution Explorer, you need to right click on "file" or "folder", and then click "Add files to source control". This is using VS 2015.