I imported the NuttX repository to my bitbucket account with name nuttx_nyx (for NyX board). Then I want to keep it in sync with mainline/upstream without accessing the bitbucket page to click on “Sync” button.
So you just need to add the upstream remote:
$ git remote add upstream https://bitbucket.org/nuttx/nuttx
Then we have two remotes now:
$ git remote -v origin https://bitbucket.org/acassis/nuttx_nyx (fetch) origin https://bitbucket.org/acassis/nuttx_nyx (push) upstream https://bitbucket.org/nuttx/nuttx (fetch) upstream https://bitbucket.org/nuttx/nuttx (push)
Then when you fetch from upstream it will be putted on you origin/master:
$ git fetch upstream From https://bitbucket.org/nuttx/nuttx afe137f..fe7d8c9 master -> origin/master
Fine, now just do the default way:
$ git push origin master
You can create your local commit and rebase it with be on top of upstream and saved to your repository.