After cloning a repository or adding a remote to your existing project, you can fetch all branches and tags from all connected remote Git repositories via the Command Palette or the terminal.

Fetch branches via the Command Palette

  1. Open the Command Palette
  2. Run the Git: Fetch remote branches and tags command (type fetch and press Enter) Git: Fetch in the Command Palette

Fetch branches using the terminal

Fetch all remote branches by running the following command in your terminal:

git fetch --all