Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Sep 2023 09:18:34 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Graham Perrin <grahamperrin@gmail.com>
Cc:        freebsd-git <freebsd-git@freebsd.org>
Subject:   Re: Working with forks: git-checkout(1) options -b and -t
Message-ID:  <5701B98C-0075-4966-9D93-C5E4A01D628D@yahoo.com>
In-Reply-To: <802423f4-a29b-74ae-f2cc-ce8f91dbf373@gmail.com>
References:  <7e6a3a98-80a8-c787-fda5-65e924dbad34@gmail.com> <CAOtMX2h1tZ3oC0a%2BMbizW9xK4Ryt5AaPtA%2B1C3g%2BTO4=vYo65A@mail.gmail.com> <543e12ed-bc12-ee0e-4ddf-4423fe704d78@gmail.com> <CANCZdfqBUbbdLGdZJT55LdJvNuZ8okF50Xs0i7C1HbRSKsa43g@mail.gmail.com> <802423f4-a29b-74ae-f2cc-ce8f91dbf373@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sep 10, 2023, at 08:58, Graham Perrin <grahamperrin@gmail.com> wrote:

On 08/09/2023 03:51, Warner Losh wrote:

> =E2=80=A6 Or 'git checkout -t jlduran/nanobsd-embedded-use-makefs' =E2=80=
=A6


> A doc tree example, now. Colour me confused.
>=20
> % git -C /usr/doc remote add outpaddling =
https://github.com/outpaddling/freebsd-doc.git
> % git -C /usr/doc checkout -b outpaddling-main --track =
outpaddling/main
> fatal: 'outpaddling/main' is not a commit and a branch =
'outpaddling-main' cannot be created from it
> % git -C /usr/doc checkout -b outpaddling-main --track outpaddling
> fatal: 'outpaddling' is not a commit and a branch 'outpaddling-main' =
cannot be created from it
> % git -C /usr/doc checkout -b outpaddling-main -t outpaddling/main
> fatal: 'outpaddling/main' is not a commit and a branch =
'outpaddling-main' cannot be created from it
> % git -C /usr/doc checkout -t outpaddling/main
> fatal: 'outpaddling/main' is not a commit and a branch 'main' cannot =
be created from it
> %
>=20
> <https://github.com/outpaddling/freebsd-doc/branches>; there's only one =
branch, main.
>=20

=46rom man git-remote:

       add
           Add a remote named <name> for the repository at <URL>. The =
command
           git fetch <name> can then be used to create and update
           remote-tracking branches <name>/<branch>.

So it looks like the next step after "git -C /usr/doc remote add  . . ." =
is:

% git -C /usr/doc fetch outpaddling

Prior to that no interaction with the remote has happened for
the local git to have found what branches exist and the like.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5701B98C-0075-4966-9D93-C5E4A01D628D>