git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git rebase interactive: usability issue

From
Theodore Tso <tytso@mit.edu>
Date
Jun 26, 2008, 12:13 UTC
Message-ID
<20080626121303.GF8610@mit.edu>
In-Reply-To
<20080625233208.GE5737@dpotapov.dyndns.org>
On Thu, Jun 26, 2008 at 03:32:08AM +0400, Dmitry Potapov wrote:
Show 6 quoted lines
> Though the user realized his mistake after my explanation of how git
> rebase works, I still believe it is a serious usability issue, because
> the same command: "git commit --amend" produces drastically different
> results depends on whether the rebase process stopped due to conflict
> or on the "edit" mark. Moreover, the commit message of second patch is
> getting lost as result of using "git commit --amend" in the former case.

This is true whether it a conflict is getting addressed during a git-rebase or a git-merge. The observation I would make is that git has stopped a rebase or a merge with a conflict that the user needs to fix up, a "git commit --amend" is almost always the wrong thing. So I could imagine a safety where after git discovers a merge conflict, it sets a flag (probably a file in the .git directory) which causes "git commit --amend" stop withan error message "this probably wasn't what you wanted", and telling the user to use a --force command if this is what they wanted. This flag would be cleared on the next "git commit" or "git reset".

In fact, we do this already for git-merge. Why not just do the same thing in the middle of a merge conflict with git-rebase?

      	     	       	       		- Ted
Previous: Dmitry PotapovNext: Dmitry Potapov
Message 6 of 7 in “git rebase interactive: usability issue”
  1. Dmitry PotapovJun 25, 2008
  2. Johannes SchindelinJun 26, 2008
  3. Junio C HamanoJun 26, 2008
  4. Avery PennarunJun 26, 2008
  5. Dmitry PotapovJun 26, 2008
  6. Theodore TsoJun 26, 2008
  7. don't allow 'commit --amend' during rebase conflict resolutionDmitry Potapov, Jun 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.