How do you create new windows workspace with TFS command line client that is running on unix How do you create new windows workspace with TFS command line client that is running on unix unix unix

How do you create new windows workspace with TFS command line client that is running on unix


Getting source files down from the server requires three steps on any platform:

  1. Create a workspace on your server. A workspace is what contains the metadata about the files you want on the server and the files you have locally.

    (Technically, you don't create a workspace on the server, you do it on a Team Project Collection which is a logical unit in the server; by default you have a single Team Project Collection on your server called - uncreatively - "DefaultCollection".)

  2. Create one or more working folder mappings that indicate the server's file paths you want to get, and where to put them on your local disk. For an uncomplicated project, this is as simple as mapping $/Project/Folder to C:\Project\Folder or /project/folder.

  3. Do a get, to download the files from the server, placing them in the local folders you configured in step 2.

For example, I have a cross-platform project which happens to be Team Explorer Everywhere itself. In this case my server is https://tee.visualstudio.com/DefaultCollection. My source is located on the server at $/TEE/Main. And I want to place it on my AIX box is /build/tee/main.

Neither the server nor the server folder change because I'm not on Windows. The only thing that changes is - unsurprisingly - the local path. I'll walk through these steps on my AIX 5.2 box:

  1. Create a workspace:

    ethomson@aix:~% tf workspace -new MyWorkspace -collection:https://tee.visualstudio.com/DefaultCollectionWorkspace 'MyWorkspace' created.
  2. Create a working folder mapping from $/TEE/Main to /build/tee/main:

    ethomson@aix:~% tf workfold -map '$/TEE/Main' /build/tee/main -collection:https://tee.visualstudio.com/DefaultCollection -workspace:MyWorkspace 
  3. Get the files. (Now that you have configured a working folder mapping, you do not need to specify the server URL or the workspace name as long as you specify the local path.)

    ethomson@aix:~% cd /build/tee/mainethomson@aix:/build/tee/main% tf get -recursive ./build/tee:Getting main/build/tee/main:Getting build/build/tee/main/build:Getting .projectGetting .settings...etc...