Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Created September 25, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save primaryobjects/04e2ca7b3583ef9054cad282608f5523 to your computer and use it in GitHub Desktop.
Save primaryobjects/04e2ca7b3583ef9054cad282608f5523 to your computer and use it in GitHub Desktop.
How to synchronize a forked GitHub repository with the upstream repository.

How to synchronize a forked GitHub repository with the upstream repository

To sync a forked github repo with the upstream repository, use the following steps:

  1. Go to your forked repository on github.com.
  2. Click the Compare button.
  3. Change the base fork to your repository.
  4. Click Compare across forks.
  5. Change the head fork to the upstream repository.
  6. Create a PR and merge into your repository.
  7. To fix "This repository is 1 commit ahead of upstream repository", in TortoiseGit, right-click the folder and select TortoiseGit->Show log.
  8. Right-click the previous log entry (the one before your sync merge commit), and select Reset master to this.
  9. Select Hard.
  10. Click OK.
  11. Right-click the folder and select TortoiseGit->Push.
  12. Checkmark the option to the right of Force and set known changes.
  13. Click OK.

Your forked repository should now be perfectly synchronized with the upstream repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment