To place a file under version control, it must be added to a folder in a project view, which stores a copy of the file in the repository. After the file has been added to the repository, you and other members of your team can check it out, revise it, and check in new revisions, while the application maintains information on all revisions of the file. When checking out a file revision, you should verify that you have the tip or latest version of the file. Doing this ensures that the file you see contains the latest changes.
When you check in a file from a working folder on your computer, the application stores it by the MD5 value of its contents. If the file is identified as one that compresses well, it is compressed and placed in the hive's archive with a .gz extension. Otherwise, the uncompressed version is placed in the hive's archive.
When you check out a file, the application copies the requested revision of that file to the appropriate working folder. If a copy of that file is already in the working folder, it is overwritten unless the working file appears to be more recent. In that case, you are prompted to confirm the check out.
You can perform check-out operations on more than one file at a time. For example, you can select files across multiple child folders using the All Descendants button, or you can check out all the files in the selected folder and its descendant folders using the Check Out All item on the File or context menu. This selection is equivalent to selecting All Descendants, all the files in the upper pane, and Check Out. When you use the Check Out All command, a confirmation dialog appears, regardless of your personal options settings.
Every time you check a file revision out, its contents are copied to a working folder. Checking out a revision also ensures that you have the tip or a specific revision to work on. For example, you may need a team member’s most recent changes to a file, or you may have deleted the working file from your hard drive and now need another copy.
Below are some recommendations about using files that are under version control: