"tf get" when file has local changes and a new version is available

tfs

Solution

If you have a pending change on a file and there are newer contents on the server, then when you do a `tf get`, you will be notified that you have conflicts, and the content will not be downloaded.

At that point, you can run `tf resolve` to raise the conflict resolution dialog, similar to what you see in Visual Studio, allowing you to automerge, merge in the three-way merge tool, or simply take the server or local version.

If you would prefer a fully automated experience (or you're using the `tf` command-line client on Unix), then you can also provide a resolution option to `tf resolve`. For example, to automerge a file:

tf resolve $/Project/File.txt /auto:AutoMerge

Problem

I have a preference of using the command line with TFS, but I'm not sure how to accomplish the equivalent of what VS2010 does when you have local changes on a file and a new version is available. VS asks the question of whether you'd like to merge, etc. Is there a way to automerge when I do a `tf get` on a file in which I've made local changes and a new version of a file is available?

Original source