VSTS Tip: Branching Source Code

Here are a few things about branching source code in VSTS via the IDE that I've learned the hard way:

First, don't try to branch the top most level node of the Team Project.  Branch subfolders.  At least in the beta, the root itself of the Team Project cannot be branched, this is the equivalent of telling TFS to give itself a nasty ingrown hair and results in what I perceive to be a fairly user surly error message.  I'm working to get you a cleaner user experience in RTM bits, but beta is what it is.

To fully graft in your branch, there are two steps.  (1) Create the branch, and then (2) check it in.  (1) To create the branch, pick your favorite subfolder in the version control explorer, right click, and then in the context menu there will be a simple option to create a branch.  After the thrill of seeing all the progress status indicators go away you might think you're done.  You're not.  It needs to be checked in.  Until you check it in, others on the team cannot see the branch and basic functionality like creating a team build type against it using the wizard will not be possible. (2) To check it in, go to the Pending Changes window by going to View->Pending Checkins and then select Check In.  Now you've done it.

Comments (3)

  1. Eric Jarvi – VSTS Tip: Branching Source Code

    Eric discusses what to do and not do when branching source…

  2. Stef Shoffren says:


    Do you have any recommendations for performing branching from the command line? I successfully used h branch to perform the branching operation, but then could workout how to perform the h checkin against that branch.


    Stef Shoffren

  3. ejarvi says:

    Here’s some troubleshooting advice for you direct from a manager working on version control: "I believe what they’re looking at is a situation where they’ve performed the branch but not yet checked in the pending changes that resulted. If they run “h status” they should see a bunch of pending changes from the branch operation. Checking in the new files shouldn’t be any different than checking in any type of pending change. Just type “h checkin” and they should get the checkin dialog. Is that not happening?"

Skip to main content