I
use github for my work and have a fork of some repositories. When I
send a pull request, often I have issues with my fork being out of sync
with the main repository.
Today, I synced up my fork without any issues. Here's how I did it.
Go to folder which contains the clone of of your fork.
git remote add upstream https://github.com/upstreamreponame/repo.git
git fetch upstream
git checkout master (to make sure you're on master)
If you want to make sure these changes don't show up as a checkin on ur fork:
git merge upstream/master
This worked great for me!
References:
Syncing a fork
How to update GitHub forked respository
Updating a fork directly from github
No comments:
Post a Comment