Merge repository into clone with modifications

Viewed 50

We have a local repository of a project, which we cloned from an online-repo some months ago and decoupled it. We made quite a few changes. Now the original repository released a new version, which we would like to merge into our clone, while keeping our modifications (or resolve conflicts).

1 Answers

One possibility, instead of merging, would be to rebase your own code on top of the newest state of the online repository.
Make sure to do so with a new temporary branch, for checking how it goes.
If this work, you will need to warn your colleagues that you are force pushing an existing branch, and they will need to reset.

 git remote add upstream /url/of/original/old/repo
 git fetch upstream
 git checkout -b integration
 git rebase upstream/master
Related