If I fork a repo so I can add my own changes, am I essentially cutting myself off from any new modifications or changes to the original repo, or can I update my forked version with the new changes and whilst keeping mine?
Asked
Active
Viewed 1,251 times
1 Answers
2
You can keep your fork in sync and keep your changes in another branch, check the docks from GitHub about Syncing a fork, basically you need to configure a remote to fork:
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
$ git fetch upstream
$ git checkout master
$ git merge upstream/master
To force your local master branch to be like the upstream/master:
$ git checkout master
$ git reset --hard upstream/master
To keep your remote updated:
$ git push origin master --force
nbari
- 23,059
- 8
- 65
- 110