Checkout a Remote Branch
With Git command line
To check out a remote branch (for which no local tracking branch yet exists):
- Use
git switch -c <branch> <remote>/<branch>
where <branch> is the branch name and <remote> the remote name (usuallyorigin
)
With SmartGit
Double-click the remote branch (in the Branches or Graph view).
The Standard window will automatically use the same branch name for the local branch (origin/foo
will use foo
).
In the Working Tree or Log window you will see a dialog that allows to specify the local branch name (e.g. if you need a different one) and whether the branch should be tracking.
