Re: [PATCH v2] git checkout -b: unparent the new branch with -o
- From
David Kågedal <davidk@lysator.liu.se>
- Date
- Apr 27, 2010, 06:35 UTC
- Message-ID
- <874oixe720.fsf@krank.kagedal.org>
- In-Reply-To
- <36ca99e91003112340u6256ef4dwb40e308c9a5e3a46@mail.gmail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
Show 9 quoted lines
> On Fri, Mar 12, 2010 at 07:53, Junio C Hamano <gitster@pobox.com> wrote: >> Erick Mattos <erick.mattos@gmail.com> writes: >>> + test "alpha" = "$(git branch | sed -n "/*/s/\* //p")" && >> >> Don't read from "git branch" in scripts; use symbolic-ref on HEAD. > > I think what he wants is: > > git rev-parse --abbrev-ref HEAD
Aha! That's a command I've been looking for a number of times. Thanks a lot for the tip.
-- David Kågedal