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'