tfsversion-controlcollaboration

TFS - How to work with multiple computers on same workspace without checking in my code everyday


I work both from the office and at home, using separate computers. Currently, to be able to continue coding from home, I need to check in all my code before leaving the office. Is there any way of making my workspace work completely online, so that I can continue my work from home without checking-in anything when I'm leaving the office?

I'm currently trying a trick; mapping my workspace on a shared folder (network drive) which I can also access from home via VPN too. But it's taking too long to even download the latest version of the project. Even if this works, I don't think it will be an efficient way because of network speed limitations.

Is there any solution for multiple computers, one user and one workspace?


Solution

  • Assuming that you are using TFVC rather than Git for source control in TFS, then you can shelve your changes rather than checking them in.

    Got to the Pending changes area of Team Explorer and click on the shelve drop down. Pending Changes window

    You now have a couple of options. You must add a name then you can select

    1. preserve pending change locally. This allows you to keep your changes in the machine you're currently working on.
    2. Evaluate policies and notes. This is only necessary of you have check in policies set up and it can be ignored if you just want to store your changes as they are not complete and applying policies at this time might be inappropriate

    Shelve changes window

    Once you have done this then hit shelve. You changes are now stored on the server. When you get to your other machine go in to "Pending Changes" and select the Actions drop down and select "Find Shelevesets"

    Pending Changes Window

    This will present a list of shelvesets committed by you. You can search for shelvesets by other users but in this case the most recent shelveset created by you should be at the top of the list.

    Find Shelvesets window

    Right click on the appropriate shelveset and select "unshelve". You should now be able to continue working where you left off.