Commit amend during a merge conflict

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux