Wednesday, September 14, 2011

How to get started with Team Explorer Everywhere command line

A project may have code in so many different platforms (.NET for website, Objective C for iPhone apps, Java for Android...), so how do you manage your source code? Don't worry, Team Explorer Everywhere can help you. I had a need to use it to add an iPhone application to our TFS source control, and it's really straight forward. You get a 90 day evaluation period, and you won't regret using this software. There's even no learning curve, after 1 hour of reading documentation you can get started using it (or you can just google how to use it and you get the instructions right away). Anyway, this is what you need to be able to checkout (yeah I've used Subversion as well) code and commit code:

// Accept the EULA
tf eula

// Use the evaluation license
tf productkey -trial

// Create the output directory
IF NOT EXIST C:\TFSGet
MD C:\TFSGet

// Create a workspace
tf workspace /new /s:http://server.sieena.com iphoneworkspace /noprompt /login:rodolfo.ortiz@sieena,mypassword

// Map the folders
tf workfold /s:http://server.sieena.com /iphoneworkspace /map $/MyProject/Release/iPhoneApp C:\TFSGet

// Go to the created directory
pushd C:\TFSGet

// Get the latest version of the code
tf get /recursive /noprompt

// Check out the code for editing
tf checkout * /recursive

// Make changes and check them in!
tf checkin -recursive -comment:"This is a fake checkin"

No comments: