I have some forked repository with my feature branches. I kept it up-to-date with the upstream using fetch/merge. At some point, upstream owner edited one commit (C2) and rewrote the whole history from that point forward (C2'-C3').
----C1---C2'--...---C3'--C5---...---C6(upstream/master)
\
---C2---...---C3(origin/master)
\
---C4(origin/feature-branch)
How can I get my fork synced now? I'd like to somehow rewrite C2-C3 with C2'-C3', rebase C4 on top of C3' and then sync my fork up to C6. I'd like to avoid just merging C6 into C3.
SOLVED:
$ git fetch upstream
$ git reset --hard upstream/master --
$ git push origin +master
$ git checkout feature-branch
$ git reset --hard master --
$ git cherry-pick C4
$ git push origin +feature-branch