Re: Fwd: Issue with Git Branch
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jan 13, 2020, 00:48 UTC
- Message-ID
- <20200113004814.GA15236@syl.local>
- In-Reply-To
- <20200113004235.GI32750@szeder.dev>
On Mon, Jan 13, 2020 at 01:42:35AM +0100, SZEDER Gábor wrote:
Show 14 quoted lines
> On Sun, Jan 12, 2020 at 04:11:43PM -0800, Taylor Blau wrote: > > On Sun, Jan 12, 2020 at 07:01:04PM -0500, Jude Guan Wang wrote: > > > I noticed something weird with my git command. In my local > > > environment I seem to have a branch named `-D`: > > > > > > And I don’t remember how I was able to create a branch like that. > > > If you do find a reproducible way to create branches named '-D' or > > similar, please do let us know, as these are not intended to be valid > > branch names in general. > > $ git update-ref refs/heads/-D master > $ git branch |head -n1 > -D
I was assuming that Jude had gotten the ref to appear by using 'git branch' alone, i.e., without the help of 'git update-ref' or 'cp .git/refs/heads/{master,-D}'.
Thanks, Taylor