Suppose I have a master
branch and a feature
branch. feature
is severely outdated and I now want to make it exactly like master
, but I want all changes made to feature
that were required in order to complete the "merge" to appear in a single commit.
First I tried this:
git checkout feature
git merge --squash master
But this gives me a squillion conflicts. I don't want to manually resolve conflicts, I want to simply take whatever is in master
and be done with it. So I do this:
git checkout feature
git merge --squash -X theirs master
With this I still get merge conflicts (where files were deleted in master
. What do I do now? I could do git reset --hard master
but then I don't get a commit message that shows the changes.
Any ideas? I'm using git 1.8.1.2
.