Re: [PATCH] tone down the detached head warning

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff King <peff@...>
Cc: <git@...>
Date: Wednesday, January 31, 2007 - 11:23 pm

Jeff King <peff@peff.net> writes:


That sounds sensible.  Another thing I found slightly annoying
about branch switching in git-checkout is that we list the paths
with local changes only when the tip of the old branch and the
new branch are different.  Very often I start hacking while on
'master' and later find the change forms a concrete "theme", and
then say "git checkout -b that-theme" to switch a branch; in
such a case I do want the list of locally modified paths.

For example:

	: gitster project/master; edit foo.c
        : gitster project/master; git checkout -b theme
	M	foo.c
	Switched to a new branch "theme"
	: gitster project/theme; edit bar.c
        : gitster project/theme; git checkout master
	M	bar.c
        M	foo.c
        Switched to branch "master"
	: gitster project/master; git checkout master^
	M	bar.c
        M	foo.c
	Detached your HEAD -- you are not on any branch.
        If you want to create a new branch from this checkout, you may do so
        (now or later) by using -b with the checkout command again. Example:
          git checkout -b <new_branch_name>
	: gitster project; 

would feel very natural and much less scary.

Note.  I run with PS1=': \h \W$(__git_ps1 "/%s"); '.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] tone down the detached head warning, Junio C Hamano, (Wed Jan 31, 11:23 pm)
[PATCH] detached HEAD -- finishing touches, Junio C Hamano, (Thu Feb 1, 5:08 am)
Re: [PATCH] detached HEAD -- finishing touches, Theodore Tso, (Thu Feb 1, 5:52 pm)
Re: [PATCH] detached HEAD -- finishing touches, Junio C Hamano, (Thu Feb 1, 9:11 pm)
Re: [PATCH] detached HEAD -- finishing touches, Carl Worth, (Thu Feb 1, 9:27 pm)
Re: [PATCH] detached HEAD -- finishing touches, Junio C Hamano, (Thu Feb 1, 9:30 pm)
Re: [PATCH] detached HEAD -- finishing touches, Carl Worth, (Thu Feb 1, 9:46 pm)
Re: [PATCH] detached HEAD -- finishing touches, Junio C Hamano, (Thu Feb 1, 10:38 pm)
Re: [PATCH] detached HEAD -- finishing touches, Theodore Tso, (Thu Feb 1, 9:16 pm)
[PATCH] git-checkout: disable guides how to switch branches ..., Matthias Lederhofer, (Thu Feb 1, 2:44 pm)
Re: [PATCH] git-checkout: disable guides how to switch branc..., Matthias Lederhofer, (Thu Feb 1, 4:51 pm)
Re: [PATCH] git-checkout: disable guides how to switch branc..., Matthias Lederhofer, (Thu Feb 1, 5:23 pm)
Re: [PATCH] detached HEAD -- finishing touches, Alex Riesen, (Thu Feb 1, 5:53 am)
Re: [PATCH] detached HEAD -- finishing touches, Alex Riesen, (Thu Feb 1, 5:54 am)
RE: [PATCH] detached HEAD -- finishing touches, Raimund Bauer, (Thu Feb 1, 5:46 am)
Re: [PATCH] tone down the detached head warning, Jeff King, (Wed Jan 31, 11:29 pm)
Re: [PATCH] tone down the detached head warning, Nicolas Pitre, (Wed Jan 31, 11:47 pm)
Re: [PATCH] tone down the detached head warning, Jeff King, (Wed Jan 31, 11:54 pm)