gh repo fork owner/repo --remote

Category: GitHub CLI

gh repo fork owner/repo --remote

Fork and add the upstream repo as a remote named 'upstream'

Forks and adds the original repository as a remote named 'upstream' for syncing.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.