git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Chris Torek <chris.torek@gmail.com>
To: noloader@gmail.com
Cc: Andreas Schwab <schwab@linux-m68k.org>, Git List <git@vger.kernel.org>
Subject: Re: Why won't git checkout a branch?
Date: Wed, 1 Jul 2020 08:13:30 -0700	[thread overview]
Message-ID: <CAPx1Gvc+pWe6UwRREHMkUCViYjzQgfg1jfbWy2pyFQCjhwV+Bg@mail.gmail.com> (raw)
In-Reply-To: <CAH8yC8kxY5mV0p-98W0uDN7PLxmNR4LkNcz9vbKsq21aTd-qQg@mail.gmail.com>

On Wed, Jul 1, 2020 at 3:10 AM Jeffrey Walton <noloader@gmail.com> wrote:
> This does not look normal, either. I don't want to create a new
> branch. I want to work on the existing branch.

Technically, you *have to* create a new branch here: you do
not have an `m4` branch (yet). Your local repository's branches
are independent of the branches in the repository you cloned.

(You could work in detached HEAD state to avoid the technical
requirement here but that's not practical for normal humans. :-) )

The suffix-`--` trick works in old versions of Git, creating the `m4`
branch from the `origin/m4` name.  If you upgrade to Git 2.23 or
later and use `git switch`, I think you will find that it's generally
more user friendly.

Chris

      parent reply	other threads:[~2020-07-01 15:13 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
2020-07-01 10:45       ` Jeffrey Walton
2020-07-01 15:13     ` Chris Torek [this message]

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=CAPx1Gvc+pWe6UwRREHMkUCViYjzQgfg1jfbWy2pyFQCjhwV+Bg@mail.gmail.com \
    --to=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=noloader@gmail.com \
    --cc=schwab@linux-m68k.org \
    /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).