I have history in git like the following:
<hash2> commit2
<hash1> commit1
<hash0> initial commit
I do git rebase -i <hash0> and choose to edit (pick -> e) both commits (commit1 and commit2). After editing commit1 I try to commit changes by doing git commit --amend, I edit commit message and save it, git says 'Ok'.
Then I do git rebase --continue and now git's trying to merge commit2 into commit1, it says that there are some conflicts after applying commit2, so I edit this commit and save it, but when I do git commit --amend instead of writing changes as commit2 it merges them into commit1.
Maybe I missed something, why could this happen and how to fix that (I want my history of 3 commits to be the same after rebasing)?