Re: [PATCH] git-checkout: disable guides how to switch branches with ui.guide

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

Re: [PATCH] git-checkout: disable guides how to switch branches with ui.guide

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:52

Matthias Lederhofer [off-list ref] writes:
quoted
* Coming back to an attached state can lose the detached HEAD, so
  I get warned and stopped.

    [git.git]$ git checkout master
    You are not on any branch and switching to branch 'master'
    may lose your changes.  At this point, you can do one of two things:
     (1) Decide it is Ok and say 'git checkout -f master';
     (2) Start a new branch from the current commit, by saying
         'git checkout -b <branch-name>'.
    Leaving your HEAD detached; not switching to branch 'master'.
I think these two are too long, after a few times one knows exactly
what to do and all this text is not necessary anymore.
I doubt adding a per-repo or per-user configuration would be
worth it.

The original hope was after a few times one would know to use
either -f or -b depending on what he wants, and would not run
plain vanilla branch switching "git checkout master".

Then one does not even have to see this message, not just the
last "instruction" lines but "You are not on any branch" part.

Re: [PATCH] git-checkout: disable guides how to switch branches with ui.guide

From: Matthias Lederhofer <hidden>
Date: 2016-06-15 22:42:52

Junio C Hamano [off-list ref] wrote:
The original hope was after a few times one would know to use
either -f or -b depending on what he wants, and would not run
plain vanilla branch switching "git checkout master".
What is the point in detached heads if the user should start using -b
after a few times?  I think detached heads are useful, so I will not
use -b with it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help