Skip to content

rebase -ir should warn (or error out) when commits were produced but not included in the final commit history #202

Open
@dscho

Description

@dscho

It is easy to do this:

pick something

reset somewhere else
pick something different
label this-is-my-branch

reset onto
merge this-is-my-branch

Obviously, the first pick was not included, by mistake.

So every time reset is executed, it should record the HEAD's hash in a growing list, and verify in the end that they are reachable (possibly using the refs/rewritten/* refs with name-rev to display nicer names).

This feature is similar in spirit to the warning when calling git checkout <branch> on a detached HEAD, where the user is told about the commits that would now be lost.

Migrated from https://bugs.chromium.org/p/git/issues/detail?id=32

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions