Open
Description
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