0

Github – update forked repository with upstream changes

Sometimes when you work with projects on Github it takes you a bit more time than expected to prepare solution which you are happy to create PR for. In those cases it is good to be able to pull changes from upstream

1. Start by cloning your fork

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

3. Updating your fork from original repo to keep up with their changes:

git pull upstream master

From this moment you can continue your happy coding with changes

rafpe

Leave a Reply

Your email address will not be published. Required fields are marked *