git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Jude Guan Wang <guan@clicktherapeutics.com>
Cc: git@vger.kernel.org
Subject: Re: Fwd: Issue with Git Branch
Date: Sun, 12 Jan 2020 16:11:43 -0800	[thread overview]
Message-ID: <20200113001143.GA13099@syl.local> (raw)
In-Reply-To: <29742805-4992-47E6-9889-F55F5EFBBFF1@clicktherapeutics.com>

Hi Jude,

On Sun, Jan 12, 2020 at 07:01:04PM -0500, Jude Guan Wang wrote:
> Hi, all:
> 	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. I
> 	tried to do git branch -D/-d this branch but seems not working. I’m
> 	assuming the branch infos were kept in .git folder so my question is
> 	if there’s anyway I could remove this invalid branch from that
> 	folder? My git version is 2.24.0. Thanks for any help in advance.

You can delete oddly-named branches by passing the end-of-options marker
to 'git branch', like so:

  $ git branch -D --end-of-options -D

(In fact, '--end-of-options' isn't strictly necessary here, and using
'--' as in 'git branch -D -- -D' will work as well).

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.

Thanks,
Taylor

  reply	other threads:[~2020-01-13  0:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56F9DC91-740F-47C7-9C2A-B6B1EC3A12B6@clicktherapeutics.com>
2020-01-13  0:01 ` Fwd: Issue with Git Branch Jude Guan Wang
2020-01-13  0:11   ` Taylor Blau [this message]
2020-01-13  0:42     ` SZEDER Gábor
2020-01-13  0:48       ` Taylor Blau
2020-01-13 11:26         ` SZEDER Gábor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200113001143.GA13099@syl.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=guan@clicktherapeutics.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).