Skip to content

Not every rebasing command rewrite commits #1277

@johnlinp

Description

@johnlinp

Which version of the book is affected?
Problem is present in source and online books.

Describe the bug:
There is a paragraph says that:

$ git rebase -i HEAD~3

Remember again that this is a rebasing command — every commit included in the range HEAD~3..HEAD will be rewritten, whether you change the message or not.

However, I found that the statement is incorrect.

Steps to reproduce:

  1. Execute git rebase -i HEAD~3.
  2. When seeing the rebase todo list, leave it unchanged and quit.

Expected behavior:
According to the above mentioned paragraph, the commits should be rewritten. However, they were not. That is, the SHA-1 between HEAD~3..HEAD were not changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions