GitHub Desktop makes it simple to configure a repository that is a fork of an “upstream” repository that the user does not write access to. This is very common for those who contribute to open source projects - contributors create a fork, clone their personal fork, make changes, and then open a pull request against the original, “upstream” repository.
It seems that when configured properly, GitHub Desktop will let you create a new branch based on the HEAD of the upstream’s main branch. What isn’t so simple to do is to sync your personal main
branch with the upstream’s main
branch - the “Fetch” button/tab will only sync against the user’s forked main
branch.
Is there a simple way to sync the fork’s main
branch with the upstream repo’s main branch? Or is this only possible via the command line:
$ git fetch --all
$ git checkout main
$ git pull upstream main