git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Jeffrey Walton <noloader@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Why won't git checkout a branch?
Date: Wed, 01 Jul 2020 12:20:09 +0200	[thread overview]
Message-ID: <87lfk3czae.fsf@igel.home> (raw)
In-Reply-To: <CAH8yC8kxY5mV0p-98W0uDN7PLxmNR4LkNcz9vbKsq21aTd-qQg@mail.gmail.com> (Jeffrey Walton's message of "Wed, 1 Jul 2020 06:09:10 -0400")

On Jul 01 2020, Jeffrey Walton wrote:

> On Wed, Jul 1, 2020 at 5:50 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Jul 01 2020, Jeffrey Walton wrote:
>>
>> > $ git checkout m4
>>
>> Try a newer git version:
>>
>> $ git checkout m4
>> fatal: 'm4' could be both a local file and a tracking branch.
>> Please use -- (and optionally --no-guess) to disambiguate
>
> Ack, thanks.
>
> This does not look normal, either. I don't want to create a new
> branch. I want to work on the existing branch.

To disambiguate, use `git checkout m4 --' if you want the branch, and
`git checkout -- m4' if you want the local file.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2020-07-01 10:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  8:41 Why won't git checkout a branch? Jeffrey Walton
2020-07-01  9:50 ` Andreas Schwab
2020-07-01 10:09   ` Jeffrey Walton
2020-07-01 10:20     ` Andreas Schwab [this message]
2020-07-01 10:45       ` Jeffrey Walton
2020-07-01 15:13     ` Chris Torek

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=87lfk3czae.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=noloader@gmail.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).