To check out a remote branch (for which no local tracking branch yet exists):
Use the git switch command where <branch> is the branch name and <remote> is the remote name (typically origin).
git switch -c <branch> <remote>/<branch>
feature/new-ui tracking origin/feature/new-ui.git switch -c feature/new-ui origin/feature/new-ui
Double-click the remote branch in the Branches or Graph view.
In the Standard Window, the local branch automatically adopts the same name as the remote branch (e.g., origin/foo becomes foo).
In the Working Tree or Log Window, a dialog appears allowing you to specify the local branch name and whether tracking should be enabled.
