Fetching remote branch to a local GIT

Created by ralphtheninjaLinked to 62.7m issues across 83 teams

tl;dr

Here's how to create a local branch that tracks a remote branch in Git using git_switch:

If the branch named "toms_branch" is present in the remote repository but not on your local branch, you can execute the following command:

git switch toms_branch

If the branch is not present locally, the command switch will look for it on the remote repository, and it will also configure remote branch tracking automatically.

However, it's important to keep in mind that if toms_branch does not exist locally, you need to run git fetch before using the switch command.