2

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?

0

1 Answer 1

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.