I need to "squash" some commits together. Normally I am used to do something like this:
git rebase -i HEAD~10
error: could not apply 2009972... fixes
When you have resolved this problem, run "git rebase --continue". If
you prefer to skip this patch, run "git rebase --skip" instead. To
check out the original branch and stop rebasing, run "git rebase
The simplest solution (after aborting the current rebase) is:
$ git reset --soft HEAD~10
Now, your HEAD has moved ten commits back, but none of your files changed: they'll all show up as new changes to be committed.
Then, just commit them as normal.
The downside to this approach is that you lose access to the intermediate commit messages when you're writing your new commit message.
The alternative is to make the original
rebase -i command work for you by by specifying conflict resolution strategy theirs:
$ git rebase -i -s theirs HEAD~10
It would be interesting to know how you've managed to get conflicts in the first place though,
rebase -i should usually apply cleanly. Unless some of those ten commits are themselves merges?