# Commit amend during a merge conflict

1 messages from 2022-10-20 to 2022-10-20. Participants: Matan Wiesner.
Thread: https://gitlist.dev/t/58654

## Matan Wiesner, 2022-10-20 08:24

Subject: Commit amend during a merge conflict
Message-ID: <CA+vqH8+zCbyF39ycKv-4=t+U2hOx7t3w5EB-+bSeyH9HdfsjMQ@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BvqH8%2BzCbyF39ycKv-4%3Dt%2BU2hOx7t3w5EB-%2BbSeyH9HdfsjMQ%40mail.gmail.com

```
Hi
When I use git to edit a long change of commit there are two scenarios I meet:
1. edit existing commit - in this case I do "git rebase -i", stop in
my commit, them run "git commit --amend" and them run "git rebase
--continue"
2. rebase and solve conflicts - when I rebase (for example on top of
main branch) and meet a conflict : "cannot apply commit A" I need to
solve these conflict, then run "git rebase --continue", it easy to
confuse and run "git commit --amend" and in this scenario, that leads
to commit A and the commit before A to be squashed.
My claim is, that there is no scenario that the user actually wants to
commit (and not run "rebase --continue") when there are merge
conflicts, therefore git should block this option.

As a reference to support my claim, I link 2 stack overflow threads of
users that did this mistake
https://stackoverflow.com/questions/41439424/i-amended-instead-of-resolving-conflict-in-interactive-rebase-can-i-undo
https://stackoverflow.com/questions/11116572/git-commit-during-git-rebase-what-really-happens


WDYT?

```
