Checking Out a Source Control Branch or Tag

The checkout operation is used to switch between different revisions on your local repository. This process updates the files in the working tree and repository index to match the version of the specified branch or tag.

If a local branch is checked out, the checkout operation also updates HEAD, to set the specified branch as the current branch. Local modifications to the files in the working tree are kept, so that they can be committed to the checkout branch.

To check out a local branch

  1. Select the Checkout command from the Git Source Control Client submenu in the Browse menu.

    The Git Checkout dialog, shown in the following image, is then displayed.

  2. Select the required local branch in the Branch combo box. This combo box includes both local and remote branches. You can identify remote branches by the remote name prefix that they include.

  3. To perform the checkout operation, click the Checkout button. (Alternatively, click the Cancel button to abandon the checkout operation.)

  4. An example of the Git Checkout Progress form is shown in the following image. The progress form displays various status messages during the checkout operation, and incrementally updates the progress bar.

    Alternatively, click the Abort button to abandon the checkout operation.

  5. Click the Close button when the checkout operation is complete.

2018.0.01 and higher

For details about checking out a remote branch or a tag, see the following subsections.