Check in a file to TFS (command line) withouth a work space

寵の児 提交于 2019-12-01 23:18:20

问题


Is it possible to just say to TFS that I have a file (call it Version.txt) and I want it to be checked in at a location (say $/MyProject/MyVersionLocation) and not have any workspace setup for that location?

Something like (pretend Syntax):

tf.exe c:\Version.txt CheckIn $/MyProject/MyVersionLocation /WorkSpaceOverride

If so, how do you do it?


回答1:


It is not possible to checkin a file without a workspace mapping for that path.

One option would be to use a combination of "tf workspace" and "tf workfold" to dynamically create a workspace before checking in.

For example:

tf workspace /collection:http://server:8080/tfs/Collection /new TempWorkspace /noprompt
tf workfold /collection:<server> /workspace:TempWorkspace /map $/MyProject/MyVersionLocation/Version.txt C:\Version.txt


来源:https://stackoverflow.com/questions/4168931/check-in-a-file-to-tfs-command-line-withouth-a-work-space

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