Export (0) Print
Expand All

How to: Branch Files and Folders

Branching is a Team Foundation source control function to create new folders or files that are based on existing ones. Branches can be used for various reasons, such as maintenance releases and changes that may break a build. For more information, see Understanding Branching. Branching can be conducted from either Source Control Explorer as demonstrated in this topic, or from the command line using the Branch Command.

Required Permissions

To perform these procedures, you must have the Check out permission set to Allow. For more information, see Team Foundation Server Permissions.

Procedure

To branch a file or folder

  1. On the View menu, click Other Windows, and then click Source Control Explorer.

  2. In Source Control Explorer, locate the folder or file that you want to branch, right-click, and click Branch.

  3. In the Branch dialog box, in the Target text box, modify the location and name for the new branch. You may also click Browse… to move to a location.

  4. In the Branch from version section, in the By list box, click the version of the source from which you want to create your new branch.

    • To branch a specific changeset, click Changeset and enter the changeset in the Changeset text box. To find a changeset, click the browse button with the ellipses (…) next to the Changeset text box.

      The Find Changesets dialog box appears.

      Use the options on the Find Changesets dialog box to filter to the changeset you want to branch. For more information, see How to: Find a Changeset.

    • To branch a file or folder based on a version date, click Date. In the Date text box, enter a date to specify a file or folder version.

    • To branch a file or folder based on a label, click Label and enter a label name in the Label text box. To find a label, click the browse button with the ellipses (…) next to the Label text box.

      The Find Label dialog box appears.

      Use the options on the Find Label dialog box to filter to the label-version of the file or folder you want to branch. For more information, see How to: Find Labels.

    • To branch the latest version, click Latest Version.

    • To branch the file or folder version that exists in your local workspace, click Workspace Version.

  5. As an option, select the Create local working copies for the new branch option that creates copies of the source on the local workspace. Leave the check box unchecked if you do not need a local copy.

    Also, leaving the check box unchecked prevents a large selection of items from being downloaded to your computer. This will improve your computer's performance.

  6. Click OK.

    The new branch is created and presented in Source Control Explorer.

  7. As an option, if you select the Create local working copies for the new branch option, and the local folder you selected is not mapped in the current workspace, the system displays a Browse For Folder window. Perform one of the following actions.

    • Browse for a folder, and then click OK.

      - Or -

    • Click Make New Folder, designate a new folder to sync to the source, and then click OK.

    NoteNote

    A branch is a pending change. For other team members to see the branch, you must perform a check-in. For more information, see Pending Checkins Window.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft