How to check-in to TFS when all files have been replaced/removed

天大地大妈咪最大 提交于 2020-01-06 19:36:21

问题


I am new to team foundation server and visual studio.

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.

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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/33522892/how-to-check-in-to-tfs-when-all-files-have-been-replaced-removed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!