locked
Unget files from TFS work folders? RRS feed

  • Question

  • Is there a way to "unget" files from a TFS local work folder?  I have a project with many branches, and each branch contains 15,000+ files.  I often need to work on a branch, and then get the files off my hard-drive while I work on another.  It also makes some operations faster, like moving a Branch folder to another folder, when the contents of the branch are considered "Not downloaded".

    I am using TFS Server 2010 and Team Explorer Everywhere CLC and Plugin for Eclipse 2010 v10.1.0.

    Deleting the files from disk doesn't help.  TFS still thinks that I have already downloaded the files, so 'tf get -recursive' says I already have the latest files.

    Thursday, August 16, 2012 8:24 PM

Answers

  • Hi Stephen,

    Thanks for your post!

    Removing the files locally does not let TFS know that you dont have them check out anymore. What you want to do when you want to remove the local copy and "unget" the files is :  Use "Get Specific Version", select "Changeset" in the dropdown, set the changeset number to be "1" and check off both bottom boxes. This will change the status of your files to "Not downloaded" and will remove the local copy of the file. It will only remove files that were put there by TFS. If you built your code and the build put files there, they will not be removed as well as any new files you created that are not in TFS.

    (Quote from http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/787c87c0-2481-4a1d-9879-5edcbfa15e99)

    Hope it helps!

    Best Regards,


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 20, 2012 6:36 AM
    Moderator

All replies

  • Hi Stephen,

    Thanks for your post!

    Removing the files locally does not let TFS know that you dont have them check out anymore. What you want to do when you want to remove the local copy and "unget" the files is :  Use "Get Specific Version", select "Changeset" in the dropdown, set the changeset number to be "1" and check off both bottom boxes. This will change the status of your files to "Not downloaded" and will remove the local copy of the file. It will only remove files that were put there by TFS. If you built your code and the build put files there, they will not be removed as well as any new files you created that are not in TFS.

    (Quote from http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/787c87c0-2481-4a1d-9879-5edcbfa15e99)

    Hope it helps!

    Best Regards,


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    Monday, August 20, 2012 6:36 AM
    Moderator
  • Is this still the only solution? This seems like a convoluted solution to what I would have expected to be a simple built in function. Is there a way to create a button to do this on the source control explorer toolbar? Any plans to add something like this as standard? It seems like this is an overlooked side effect of local workspaces.
    Wednesday, November 5, 2014 9:40 AM
  • It's a been a long time since this question was asked. Hopefully, this will help someone landing here looking for an answer.

    But, at least with TFS 2012 and VS 2015, I'm able to use Cloak command to unget files.

    In Source Control Explorer, right click on branch to be ungotten. Then, Advanced | Cloak.

    Monday, November 21, 2016 5:31 PM
  • Cloak is slightly different because, when you cloak, you can no longer merge to the item(s) that were cloaked.
    Friday, January 20, 2017 9:25 PM