Partilhar via


Q&A About TFS Version Control

In my last post about Visualizing Change using TFS 2010 I mentions that I am going to post some answers about different questions I usually get asked by other software engineers when I mention that I work for the TFS team. In this post I will list the most commonly asked questions and answers:

Q: When I do a “Get” TFS does not get the files I requested?

A: I heard this complaint from a couple of TFS users. The user scenario here is

    1. The user synced his workspace to local disk
    2. The user then deletes some files from the local disk
    3. When the user executed get again from VS or using “tf get”
    4. VS prompts the user with a message saying “All files are up to date.”

The reason that this is happening is that TFS server keeps track of the version for every file you last downloaded and will not do an subsequent downloads unless a newer version of the file exists on the server.

To mitigate this problem you need to execute “Get Specific Version” and check the force flag and that will force the server to sync your files again.

Q: Does Microsoft use TFS internally?

A: Yes. Microsoft uses TFS internally in some divisions. My team dogfoods (uses) TFS as our source control / bug tracking / build system. Brian Harry usually blogs out our internal TFS offerings. Here is his latest post about that.

Q: Can I force my developers to only check-in when their changes build?

A: Yes, a new feature called “Gated Check-in” was developed in TFS 2010 to address this issue. In this feature basiclly when the developer clicks “Check-in” he/she is prompt to start a build to submit the changes. If the build completes successfully, the changes are checked in. For a demo of this feature you can read, Jim Lamb’s our Team Build’s PM post about gated check-in here.

Q: Can I undo my changes when I am working offline?

A: No. For TFS 2005/2008/2010 the user has to be connected to be able to undo a change. This request aligns with an enhancement that is planned for later releases around the experience of working offline. For TFS 2010, we did a lot of enhancements in the Offline Experience when working with bound solutions and projects. However, you still need to be connected to be able to undo your changes.