Re: ephemeral-branches instead of detached-head?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: ephemeral-branches instead of detached-head?

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

Duy Nguyen [off-list ref] writes:
On Mon, Aug 12, 2013 at 7:14 PM, David Jeske [off-list ref] wrote:
quoted
IMO, the current warning during checkout of a detached-head is
misplaced. It should be removed, and instead there should only be a
warning after detached-head commit, since this is the only time there
is a danger of losing something.
That would annoy me as I often work on top of detached HEAD on purpose
and only create a branch when I want to save something. If the warning
is to be moved, it should warn at the next checkout.
Don't we already do that?

    Warning: you are leaving N commits behind, not connected to
    any of your branches:

        ... list of commits to be lost ...


    If you want to keep them by creating a new branch, this may be a
    good time
    to do so with:

     git branch new_branch_name xxxxxx

    Switched to branch 'master'

Re: ephemeral-branches instead of detached-head?

From: David Jeske <hidden>
Date: 2016-06-15 22:58:24

On Mon, Aug 12, 2013 at 10:24 AM, Junio C Hamano [off-list ref] wrote:
Don't we already do that?

    Warning: you are leaving N commits behind, not connected to
    any of your branches:

        ... list of commits to be lost ...
This only shows on checkout... not reset, not submodule-update, nor
any other ways you can clobber a detached head.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help