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

Strange behavior with git rebase (-i)

From
SMStefan (metze) Metzmacher <metze@samba.org>
Date
Feb 2, 2008, 10:44 UTC
Message-ID
<47A44974.7050907@samba.org>
Hi,
I just hit a really strange thing:

I was on a branch called 'v4-0-test', then I did a git rebase -i orgin/v4-0-test and removed some patches and prefixed all others with 'edit'. Then:

git commit --amend
git rebase --continue
git commit --amend
git rebase --continue
git commit --amend
git commit --amend (again)
git branch
 * v4-0-test
git log
 (this showed what I wanted)
git show -p --stat
 (to really make sure that the top revision is the one I want)
git push origin v4-0-test
 And this pushed the top revision BEFORE the rebase!!!
 Because I forgot a 'git rebase --continue' to finalize the rebase.

In the end it's my fault, because I forgot the last rebase --continue, but I think it's bad that git behaves that way.

Would it be possible to disable some operations while others are unfinished, git am (-i) might have similar effects.

I was using git 1.5.3.2

Could it be that 6fd2f5e60d4d574ff9e5dd8ce1e229328c785d69 was created to fix a similar problem?

metze

http://gitweb.samba.org/?p=samba.git;a=commit;h=ec0ee2aa5f4bef32f09a426d91c28c985f843038 and the 10 commits before...:-(

Next: Johannes Schindelin
Message 1 of 5 in “Strange behavior with git rebase (-i)”
  1. Stefan (metze) MetzmacherFeb 2, 2008
  2. Johannes SchindelinFeb 2, 2008
  3. Steven WalterFeb 2, 2008
  4. Johannes SchindelinFeb 2, 2008
  5. Stefan (metze) MetzmacherFeb 3, 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.