Removing Local Source Control Files with TFS

One of the things in TFS that has been of little value to me is the “Latest” column, found in the Source Control explorer.  The intent behind this feature is a good one:  Be able to easily tell if you have the most recent version of a source file, or if somebody has checked in a new version since you’ve last pulled down code.  But somewhere between idea and implementation, something got lost.

View of Files in TFS

View of Files in the TFS Source Control Explorer

There’s an annoying little side effect to this feature.  If the developer decides to make changes to files outside of TFS – for example, deleting local files that are no longer worked on – TFS will not recognize that the developer no longer has the latest version.  This becomes very irritating when trying to re-download the files using GET LATEST.  Because TFS thinks you already have the files on your local machine, it will, by default, skip downloading the files.

Fortunately, Martin Woodward posted a solution on his blog a while back on how to correctly clean up your local files while, at the same time, keeping TFS in sync.  I consider this to be a bit of a hack, because it seems very unintuitive.  However, I haven’t seen any new features in TFS 2010 to lead me to believe that a more intuitive approach is being added.  So, either Microsoft isn’t getting much feedback on this, or they consider Martin’s approach to be the preferred approach…

Meanwhile, I’ve since found myself doing this somewhat frequently after finishing projects, in order to keep my local directories from piling up with old files that I no longer need.

One thought on “Removing Local Source Control Files with TFS

  1. Martin Woodward

    A “bit of a hack” is somewhat of an understatement, it is a “lot of a hack” 🙂

    I don’t see this improving in the 2010 release but hopefully sometime soon after that the issue will be looked at. If there was some way that the source control explorer could merge the views of the local file system and the server file system it would really help and doesn’t seem beyond the realms of possibility. Only time will tell.

Leave a Reply

Your email address will not be published. Required fields are marked *