How to update a forked repo from original one
Sync new changes from original reposiotry to your repository
You can update your forked repository with changes from the original repo using the steps below.
Step 1: Go to your local repository folder
cd project_folderStep 2: Change to master, or whichever branch you want to pull changes into
git checkout masterStep 3: Verify your current origins are configured for fetch and push with the command below
git remote -vStep 4: Add an upstream remote to your local repository with the command below
git remote add upstream https://github.com/-username-/-original-repository.gitStep 5: Verify the upstream remote was added
git remote -vIt should now show 4 lines, 2 for origin and 2 for upstream, where origin is your repository and upstream is the original repository you forked from.
Step 6: Fetch all changes from the original repository
git fetch upstreamStep 7: Merge the changes into your branch, or rebase instead if you prefer.
git merge upstream/masterOr
git rebase upstream/masterStep 8: Push the new changes to your repository.
If you rebased, your history has diverged from origin, so you'll need a force push. Check the warnings first, and if everything looks right, force-push:
git push origin master --force