Why you should not DELETE after a MOVE if history is important to you!

What happens when you use the move feature in the Source Control Explorer? Let’s explore in a demo environment, do NOT test this on a production system!

Exploration #1 – Let’s do a quick move and see what happens

We create two team projects DemoSource and DemoTarget, both using the TFVC for version control.

  1. We create two team projects DemoSource and DemoTarget, both using the TFVC for version control.

  2. Next we create a Main folder and convert each to a branch.

  3. We should now see something like this:


  4. Add a solution named DemoSolution to the DemoSource team project and create some churn (history).

  5. As shown we now have 5 changesets worth of history in the DemoSource team project:


  6. Next we move the DemoSolution from the DemoSource team project to the DemoTarget team project, using the solution explorer:


  7. Check in the pending change created by the move.

  8. If you check the history on DemoTarget team project you will notice that history from DemoSource is missing, it was NOT moved.

    Moves (aka renames) are implemented as a branch + delete operation - we branch from the source (i.e. team project) to the target and delete the items from the source. 

    Verify that you are ABSOLUTELY sure, before your delete the DemoSource team project.

  9. As highlighted in the following warning all source control items will be destroyed and we will no longer be able to follow the move operation to the original location. 

    Exploration #2 – When does history vanish?

    • Re-do the exploration #1, but STOP after step 6 and do not check-in the pending move change, which is actually a rename:
    • Looking at the history of the DemoTarget, we notice we see history from the source:
    • Once we commit the pending change, the source evidence disappears.
    • By looking at the changset (39) details, we can still track the move back to the DemoSource.
    • Going to DemoSource we can find the missing history.
    • But … as soon as you delete your source, the changeset (39) details change as we can no longer track the move back to the origin … vanished (deleted)!

    Hope this clarifies the Move using Source Explorer. If you need to move history, you should read Understanding TFS migrations from on-premises to VSO - Part 1 - Concepts and investigate Migration and Integration Solutions.

    Comments (4)

    1. ErikEJ says:

      Assume you mean "Source Control Explorer", not "Solution Explorer" in first sentence?

    2. @ErikEJ – Yes, thank you for spotting that.

    3. Jean-Pierre says:

      Hello Mr Schaub,

      Thanks for this post.  I came across the same problem a few weeks ago!

      Best Wishes



    4. Steve Olner says:

      I have been advocating this to my teams for a while now , nice to see it in print as a reference for standards

    Skip to main content