I had a feature branch:
feature
with lets say 10 commits
then some time ago I started doing experiments on it, but wanted to preserve the current functionality just in case, so I started a new branch:
feature-experiment
and then did another 10 commits
today I decided to merge
feature-experiment
into feature
and then I deleted feature-experiment
. There were some merge conflicts which I resolved.
then, my 20 commits which were all using the same name and ending in WIP
(work in progress), were very ugly, so I decided to
git rebase -p -i HEAD~22
I changed pick
to s
to squash them all into the oldest commit for this feature, but I had some merge conflicts (the same as before). I resolved them and then
git add -A && git commit
git rebase --continue
but now I get the following error:
error: Commit asd123qsd is a merge but no -m option was given.
fatal: cherry-pick failed
Could not pick asd123qsd
This is the last commit (the merge one)
I tried again, but this time I didnt change this particular commit's pick
to s
, but got the same error.
How can I carry out this dreadful rebase?
I was thinking, as a possible solution, I could I modify the last commit to add -m to it, but how do I do that and what do I do with this -m command? Are there any other options
--preserve-merges
flag... – Hux-p
) – Mccammonfeature
branch was creatd and I don't know how to resolve it – Mccammon