git checkout -t origin/feature-notifications

Category: Git - Core

git checkout -t origin/feature-notifications

Create a local branch tracking a remote one

Creates a local branch named after origin/feature-notifications and sets it to track that remote branch in one step. The -t flag stands for --track. It is the fastest way to start working on a branch that exists only on the remote.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.