替换/删除所有文件后如何签入到 TFS

问题描述:

我是团队基础服务器和视觉工作室的新手.

I am new to team foundation server and visual studio.

我有一个非 VS 项目,由于公司政策,我需要通过 TFS 进行版本控制.我使用与 TFS 不同的工具来编辑我的项目,所以当我准备推送我的更改时,我只是从 TFS 检出项目并清除本地目录以替换为项目的新版本.我现在无法签入更改,因为 TFS 正在查找我删除的文件.

I have a non-VS project that I need to version control through TFS because of company policies. I use a different tool than TFS to edit my project, so when I was ready to push my changes I just checked out the project from TFS and cleaned out the local directory to replace with the new version of the project. I am now unable to check-in the changes because TFS is looking for the files that I deleted.

如果我需要清除并替换项目中的所有文件,我如何将其签入 TFS?有没有办法强制 TFS 使用我的本地版本?

If I need to clean out and replace all files in a project, how can I check it in to TFS? Is there a way to force TFS to use my local version?

现在您需要对这些已删除的文件执行撤消挂起的更改.您可以通过 Team Explorer 或 tf.exe 命令来实现.在团队资源管理器中,选择已删除的文件,然后单击撤消全部.您也可以使用 tf 撤消命令:

Now you need to do do undo pending changes for these deleted files. You can achieve it through Team Explorer or tf.exe command. In Team Explorer, select deleted files and click Undo All.You can also use tf undo command :

tf undo /workspace:"TheWorkspace";TheUser 
   $/MyProject" /server:MyServer /recursive 

然后签入项目的新版本.

Then check in your new version of the project.

如果您想使用 Windows 资源管理器来管理 TFS 版本控制文件,您需要:
首先,创建一个workspace文件夹,把你的项目放在这个文件夹中.
然后使用带有

If you want to use Windows Explorer to manage TFS version control files, You need to:
First, create a workspace folder, put your project in this folder.
Then use Windows Shell Extensions comming with TFSPowerTools2015 to check in/check out files in the local workspace folder.