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?

Lee
  • 4,187
  • 6
  • 25
  • 71

1 Answers1

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
  • 25,603
  • 10
  • 76
  • 131