26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• To learn how to customize a check-in policy, see “Walkthrough: Customizing Checkin<br />

Policies and Notes” at http://msdn2.microsoft.com/enus/library/ms181281(VS.80).aspx<br />

• To view sample code that will disallow selected patterns upon check-in, see “Checkin<br />

Policy to Disallow Certain Patterns” at<br />

http://blogs.msdn.com/jmanning/archive/2006/02/02/523125.aspx<br />

• To see sample code that will enforce comments upon check-in, see “Sample Checkin<br />

Policy: Make Sure the Comment Isn’t Empty” at<br />

http://blogs.msdn.com/jmanning/archive/2006/01/21/515858.aspx<br />

• To learn how to register a new check-in policy, see “I’ve Made a New Check-In<br />

Policy! How Do I Add It?” at<br />

http://blogs.msdn.com/jmanning/archive/2006/02/07/526778.aspx<br />

• For more information about using code analysis tools, see “Guidelines for Using<br />

Code Analysis Tools” at http://msdn2.microsoft.com/enus/library/ms182023(VS.80).aspx<br />

• For more information about creating a new policy, see “Policy Plug-ins” at<br />

http://msdn2.microsoft.com/en-us/library/bb130343(VS.80).aspx<br />

Checkout, Get, and Lock<br />

• How to synchronize your computer <strong>with</strong> TFS<br />

• How to prepare a file for editing<br />

How to Synchronize Your Computer <strong>with</strong> TFS<br />

To synchronize your computer <strong>with</strong> the version control server, use the tf get command.<br />

This is a quick way of ensuring that your computer is synchronized <strong>with</strong> the rest of your<br />

team to ensure that you have the latest copy of shared work. To download all files and not<br />

just those that are out of date, run the following command from a <strong>Visual</strong> <strong>Studio</strong> 2005<br />

command prompt window:<br />

tf get /all<br />

When you use this command, any local writable files that you might have on your<br />

computer are not overwritten. If you want to overwrite local writable files to completely<br />

synchronize your computer <strong>with</strong> the server, use the /force switch as follows:<br />

tf get /force<br />

Although this command overwrites local writable files, it does not overwrite writable<br />

files for which you also have pending edits. If you have pending edits on a file that you<br />

need to keep, check in or shelve your edits prior to re-synchronizing <strong>with</strong> the server.<br />

To perform the same operation from <strong>Visual</strong> <strong>Studio</strong>:<br />

1. In <strong>Team</strong> Explorer, double-click the Source Control folder, right-click your server<br />

or team project, and then click Get Specific Version.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!