From nobody Sat Jul 17 23:38:42 2021 X-Original-To: freebsd-git@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E8A7E11E371C for ; Sat, 17 Jul 2021 23:38:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GS4Lg6G25z3kvC; Sat, 17 Jul 2021 23:38:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id A447EE886; Sat, 17 Jul 2021 23:38:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2001:470:7a58:0:4403:ad03:2400:b09d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 43A1F483A7; Sun, 18 Jul 2021 01:38:50 +0200 (CEST) From: Dimitry Andric Message-Id: <88BFF43D-8D78-4032-BFE6-25BFA255EA19@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_D27996B3-9668-4473-A9A8-047AA0F8BD16"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: '2021Q3' does not appear to be a git repository Date: Sun, 18 Jul 2021 01:38:42 +0200 In-Reply-To: Cc: freebsd-git@freebsd.org To: Thierry Thomas References: <08AF3528-0EF2-4169-8EE2-AA9BD2F6BDC3@FreeBSD.org> X-Mailer: Apple Mail (2.3654.100.0.2.22) X-ThisMailContainsUnwantedMimeParts: N --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 wrote: >=20 > Le sam. 17 juil. 21 =C3=A0 21:30:39 +0200, Dimitry Andric = > =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--