📌
Create a local branch that tracks a remote branch
description
git fetch remoteName
git switch -c localBranchName -t remoteName/remoteBranchName
git switch -t, --track
When creating a new branch, set up "upstream" configuration.
example
For example, when cloning a remote repository.
git fetch origin
git switch -c dev -t origin/dev
Discussion