Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
linenumberstrue
git reset --hard upstream/master # Reset back to upstream.
git fetch upstream               # Get latest changes from upstream
git merge upstream/master        # Merge changes with local master
git push origin master           # Synchronize the private fork

REVISIT: The last push requires a --force. reset --hard then push --force, why don't we encourage using a branch and drop this approach?

Often, a fork will diverge too much from the upstream repository to keep in synchronization properly.  In this case, feel free to create a new private fork, removing the old forked repository first, of course.
It is a common practice to delete a fork after the pull-request has been closed.  GitHub even supports a special shortcut to delete your fork.  After the your PR has been closed, go to the https://github.com/apache/incubator-nuttx/pull/NN page (where NN is the PR number that was assigned to your pull request).  You will see this message on that page:

...