Date: Sun, 18 Jul 2021 01:38:42 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Thierry Thomas <thierry@FreeBSD.org> Cc: freebsd-git@freebsd.org Subject: Re: '2021Q3' does not appear to be a git repository Message-ID: <88BFF43D-8D78-4032-BFE6-25BFA255EA19@FreeBSD.org> In-Reply-To: <YPNWriwODjZE9Lun@graf.pompo.net> References: <YPMFCirtNyQQ3uE8@graf.pompo.net> <08AF3528-0EF2-4169-8EE2-AA9BD2F6BDC3@FreeBSD.org> <YPNWriwODjZE9Lun@graf.pompo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_D27996B3-9668-4473-A9A8-047AA0F8BD16 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 18 Jul 2021, at 00:16, Thierry Thomas <thierry@FreeBSD.org> wrote: >=20 > Le sam. 17 juil. 21 =C3=A0 21:30:39 +0200, Dimitry Andric = <dim@FreeBSD.org> > =C3=A9crivait : >=20 >>> I=E2=80=99d like to MFH some commits, but I cannot get the branch = 2021Q3. >>>=20 >>> Trying `git checkout 2021Q3' gives: >>> error: pathspec '2021Q3' did not match any file(s) known to git >=20 >> Try "git fetch origin" first, and then you should see the 2021Q3 = branch >> (note: it is *not* a remote!) appear: >=20 > Thanks, that did it! >=20 > Strangely, previously `git checkout 2021Q2' had been sufficient=E2=80=A6= This isn't strange really, but just how git works. If the remote repository called 'origin' acquires any new objects, such as branches (for example because somebody creates the 2021Q3 branch and pushes it) your local repository will not automatically know about this. You first "fetch" the remote repository, by running 'git fetch origin' (note that the default remote is usually called origin, so you can leave it off and run 'git fetch' instead), and only then the local repository knows about any new commits, branches, tags, etc. Most people use 'git pull' to update their local repository, and this is simply a shorthand for 'git fetch', followed by 'git merge' or 'git rebase', depending on your git configuration. But this is really only appropriate for existing branches such as main, not new ones. -Dimitry --Apple-Mail=_D27996B3-9668-4473-A9A8-047AA0F8BD16 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYPNqAgAKCRCwXqMKLiCW o9hTAKCWg+3sVeDAnZqiIfpOTu7OF5KnHACePefPMekQE7bNF29qJTC0BnlcopY= =LXTN -----END PGP SIGNATURE----- --Apple-Mail=_D27996B3-9668-4473-A9A8-047AA0F8BD16--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88BFF43D-8D78-4032-BFE6-25BFA255EA19>