https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork
https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork
https://os.mbed.com/docs/mbed-os/v6.1/contributing/index.html
$ git clone https://github.com/username/mbed-os
$ cd mbed-os
$ git remote add upstream git@github.com:armmbed/mbed-os.git
$ git checkout master
$ git fetch upstream
$ git merge upstream/master
$ git push
Now, your master branch for both local and remote repo is up-to-date (same as ArmMbed/mbed-os master branch)
$ git checkout master
$ git pull
$ git checkout your_dev_branch
$ git rebase master
# if you get conflict file, please fix it manually
$ git push -f
Now, your development branch is up-to-date and has your commits code.