Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update a fork on github [duplicate]

Tags:

git

github

I forked a repo on github and changed a couple of things. The original repo has committed a couple of things. How can I update my fork without re-forking and undoing all my changes?

like image 779
Atrotors Avatar asked Jun 28 '15 04:06

Atrotors


1 Answers

From your terminal in your local project folder...(and provided you have configured the remote for your fork)

git fetch upstream
git checkout master
git merge upstream/master

(See the github Syncing a fork docs for more info)

like image 69
sfletche Avatar answered Oct 02 '22 05:10

sfletche