Create a Branch

You can’t create a branch in an empty Git repository. First, you have to clone the repository to your computer, add and commit files to the default main branch that’s automatically created, and then push the branch to the project's Git repository. Only after the main branch has been pushed to the repository, can you create additional branches.

A branch can be marked as a private branch. Only branch owners can push commits to a private branch. You must be a project member to be able to create a branch.

You can create a branch from the VB Studio Designer as well. We'll describe that here too.

From the Git page's Refs view , you can create a branch from the base branch, from the head (tip) of an existing branch, or from a tag:

Action How To

Create a branch from a base branch

  1. In the Git page's Refs view, click Branches Branches.

  2. From the Repositories drop-down list, select the repository.

  3. Click + Create Branch.

  4. In the New Branch dialog box, in Name, enter the branch name. From the Base drop-down list, select the base revision name.

  5. To mark the branch as a private branch, select the Private Branch check box.
  6. Click Create.

Create a branch from the head (tip) of another branch

  1. In the Git page's Refs view, click Branches Branches.

  2. From the Repositories drop-down list, select the repository.

  3. Click + New Branch.

  4. In the branch list, next to the source branch name, click Actions the Actions icon, and select Branch.

  5. In the New Branch dialog box, enter a name for the new branch.

  6. To mark the branch as a private branch, select the Private Branch check box.
  7. Click Create.

Create a branch from a tag

  1. In the Git page's Refs view, , click Tags Tags.

  2. From the Repositories drop-down list, select the repository.

  3. Click + New Branch.

  4. In the tags list, next to the tag name, click Actions the Actions icon and select Branch.

  5. In the New Branch dialog box, enter a name for the new branch.

  6. To mark the branch as a private branch, select the Private Branch check box.
  7. Click Create.