git track

Updated Jul 13, 2026

Fetch the first remote, then switch to or create a tracking branch from remote/branch. If the local branch already exists, git track checks it out and merges from the remote branch. If the remote branch does not exist, it suggests close matches.

# Switch to an existing local branch and update it

git track feature/foo