Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Fwd: ephemeral-branches instead of detached-head?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:24

Junio C Hamano [off-list ref] writes:
David Jeske [off-list ref] writes:
quoted
quoted
When you do "git commit --amend",
the current commit will become dangling (in the sense that it's not
referred by any ref, but the commit exists) and those are just noise
in my opinion.
This is *exactly* my point.

There is no way to distinguish a commit which was accidentally and
implicitly dangled due to checkout or submodule update on a detached
head, from all those other intentionally dangling refs which were
explicitly handled with merge, rebase, amend.
I do not follow.  Just like "commit --amend", checking out another
branch to leave a detached HEAD _is_ an explicit way to discard what
you started experimenting behind, declaring it useless.  Otherwise
you would have saved it to some named branch.

This of course assumes that, as you said in one of your earlier
messages, the user knows what he is doing, though.
By the way, by the above I do not mean "checking out a named branch
should not be protected".  I am saying "treating commits lost by
running 'commit --amend' differently does not make sense to me".
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help