Configure a remote that points to the original upstream repository
Open GitBash.
List your fork’s current configured remote repository: git remote -v
Add a new remote upstream repository that will be synced with the fork. git remote add upstream <ORIGINAL_REMOTE_REPOSITORY>
Sync your fork
Open GitBash
Clone your fork, or change the current working directory to your local (cloned) project.
Fetch the latest updates from the original upstream source: git fetch upstream
Checkout your fork’s master branch git checkout master
Merge the changes from upstream/master into your local master branch. This brings your fork’s master branch into sync with the upstream repository, without losing your local changes. git merge upstream/master
To merge and force update your fork with the latest changes, do: git pull upstream master