I have a git repository and two branches master
and st
(branched from master
). I want to rebase st
onto master
. However, master
has been massively rewritten by somebody else, to be frank I'm not sure why, but we were prompted to fetch
the new master
and reset --hard
our private branches to it.
If I try git-rebase
the listing of non-trivially conflicted files that need manual merges span over two screen pages.
I know that the actual changes are not that much. For one, the st
branch only touched a handful of files (not more than ten, I'd guess).
Besides rebasing I tried to create a patch开发者_如何学Go and apply it, but there are some conflicts as well, which I have no clue how to resolve.
The solution appears to be mind-bogglingly easy, as suggested by this answer, you can simply do
git am -3 changes.patch
if changes.patch
is the full patch file.
精彩评论