I cannot squash commits with git rebase -i command
, getting the following error message.
error: could not apply 3ad5c7b...
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".
What is the error and how to resolve it?
Before you start, keep in mind that you should squash your commits BEFORE you ever push your changes to a remote repository. If you rewrite your history once others have made changes to it, you're asking for trouble… or conflicts.
If you want to merge the last 2 commits into one and look like a hero, branch off the commit just before you made the last two commits (specified with the relative commit name HEAD~2). That will bring in the changes but not commit them. So just commit them and you're done.
Git failed to merge automatically. Try git mergetool
and resolve conflicts, then continue your rebase with git rebase --continue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With