Re: Why won't git checkout a branch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 1, 2020 at 5:50 AM Andreas Schwab <schwab@xxxxxxxxxxxxxx> 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.

$ git checkout origin/m4
Note: checking out 'origin/m4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 5c3967f Merge branch 'm4' of
https://github.com/noloader/libb2 into m4

Jeff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux