1

I'm trying to use the TFS command line client (tf.exe). When I run 'tf get someProject' it hangs, and then says 'All files are up to date'. Nothing is downloaded. How can I get files from TFS using the command line client? Thanks,

213897

213897
  • 1,561
  • 4
  • 15
  • 16

1 Answers1

2

Are you using the /recursive switch to tell TFS to get everything in the Team Project? If you are then it sounds like TFS thinks that you already have the latest version in your local workspace. If you know this is incorrect you can use /force switch which tells TFS to ignore what it thinks is in the workspace and get everything (this will take a while if you have a large codebase and / or lots of branches)

James Reed
  • 13,873
  • 51
  • 60
  • well I'm unsure how to tell it what project to get too. say I wanted 'someProject', if I didn't have a workspace set up I'd do 'tf workspace /new' from the directory I wanted to set up the workspace in and then 'tf get someProject /recursive' to download it? – 213897 Mar 30 '11 at 18:03
  • I create a couple of batch files in the path. One called tu.bat with tf get . /r which does an update. The other is ts.bat with tf status . /r to output status update. – Ryan Cromwell Mar 30 '11 at 18:10
  • You can also do this in Powershell with function TfsStatus() { tf status . /r } function TfsUpdate() { tf get . /r } set-alias ts TfsStatus set-alias tu TfsUpdate – Ryan Cromwell Mar 30 '11 at 18:19
  • I did that, but `tf get someProject /recursive` just made the directory folder, and didn't populate the folder. Doing `tf get someProject /recursive /force` outputs 'Replacing someProject' and doesn't populate the folder – 213897 Mar 30 '11 at 18:38
  • in this context what is "someProject" you need to give tf a tfs path e.g. tf get $/myTeamProject/devBranch/source/mySolution/ /recursive – James Reed Mar 30 '11 at 19:23
  • odd, the full path downloads everything with the `/force /recursive` options where using only the project name simply makes the directory structure, cheers, – 213897 Mar 31 '11 at 15:22