gh repo sync --branch main

Category: GitHub CLI

gh repo sync --branch main

Sync a specific branch from upstream into the fork

Syncs a specific branch from the upstream into your fork.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.