From owner-freebsd-git@freebsd.org Wed Jan 27 23:29:48 2021 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AED5F4ED7B9 for ; Wed, 27 Jan 2021 23:29:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DR0F72pT9z3mMv for ; Wed, 27 Jan 2021 23:29:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1611790186; bh=yBZTRngplZsjDyQPuXY/49GrB5WTyd7r6k1SJMShTGk=; h=Subject:From:Date:To:From:Subject:Reply-To; b=a6PF7zWkQxkMNPU6FKHqycLZ0TQyv+ebS/9ItPiSpnkqO3NKPIQQX6XZFzJKAecaRtoaavvGYt98Gb9tSu6zvPKQ5QqHW0scGodwoa0FMKskC5Fa5TjFc5gRw1WWVOLRxCI4FXC+YL4K974u9l4bXTKA1FoqfFwsUygvugHxwMsZ4WFlYUHaQpDYQnRlIr1OJXMUGbEVJtkrR9sqEzM+bCoFY1hSp33yfGihfwNvOFj91IU/OkT2dT3bFvRFwSIvQbP2Djdq7tQvB6xQVx665Ru+RS5WE+oGG2Ms/5xXH3Zurwsn6IpJC8K3ZeqZZzUvqzh6HudsXDFt95Mf1oFF/w== X-YMail-OSG: QR5C85UVM1nYxL6cM8ffmJmsYZXtDqDKvmokaKdnWzWlU52MFIyqpCabQFFYv4T cLE7ZZuO8rMmMeBOwLG7KYvofWER7TNpbnyKGTcaeTW0ataIAFsAy5IKkYwjcBoV.wFYIqsk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4djZxo16TCF0qt58VXy1pLRW9uliZi5eWvO8JHTMq.9kymfB2JwBTeNOmld6w75uiWx8UgB 8eYDkS4X9XdeSqxPprUejpBsI_D34Cz0ZWOQml.VbCmWNdh2B9GRsydbnj8xIIqb_2NmB.4.nqX4 8Q.J9SfBV2A88CTvduQJ.WgOpQPgiJUf6CcrC1X1O4o0gD3gw6hWaj8iw6fNghtqs6.e5hy1WCrb 2l.V1AvDIbEFFE1NSs2l1m.8a7bwpy34tNit81nrpJfZaYMWcIG3YBR_wnkqCznjDNk4cUJY- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Wed, 27 Jan 2021 23:29:46 +0000 Received: by smtp404.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 63bd2303a8cd779a5976e508ec9072a9; Wed, 27 Jan 2021 23:29:40 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: git setup/usage question From: Mark Millard In-Reply-To: Date: Wed, 27 Jan 2021 15:29:38 -0800 Cc: Milan Obuch , freebsd-git@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <00F58366-4178-458E-8865-E1A2E5324EB4@yahoo.com> References: <20210126151017.4a9dd711@zeta.dino.sk> To: =?utf-8?Q?Ulrich_Sp=C3=B6rlein?= X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Rspamd-Queue-Id: 4DR0F72pT9z3mMv X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.148:from]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.148:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.148:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-git] X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2021 23:29:48 -0000 On 2021-Jan-27, at 12:55, Ulrich Sp=C3=B6rlein = wrote: > On Tue, 2021-01-26 at 15:10:17 +0100, Milan Obuch wrote: >> . . . >> # git -C /mnt/src/.git fetch >> remote: Enumerating objects: 5, done. >> remote: Counting objects: 100% (5/5), done. >> remote: Compressing objects: 100% (5/5), done. >> remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 >> Unpacking objects: 100% (5/5), 42.60 KiB | 484.00 KiB/s, done. >> =46rom https://git.freebsd.org/src >> * branch HEAD -> FETCH_HEAD >>=20 >> This time there is something new... I need a merge now. >>=20 >> # git -C /mnt/src/.git merge >> fatal: this operation must be run in a work tree >=20 > No, you don't want to merge. Why would you merge? You want to run `git = pull`, that will pull the updates from the remote refs into your local = refs. QUOTE from https://git-scm.com/docs/git-pull : git pull is shorthand for git fetch followed by git merge FETCH_HEAD END QUOTE (other wording for the likes of --rebase not quoted) Looks to me like he tried to do something like what git pull does, but in two explicit, separate steps: git fetch and git merge . >>=20 >> I am a bit stuck now. What does it mean 'being in a work tree'? Doing >> 'cd /mnt/src/main' or similar before git command does not change >> anything. I read 'man git-merge' but still no clue. It must be >> something simple, I just do not see it. >>=20 >> Also, >>=20 >> # git -C /mnt/src/.git log >>=20 >> does not show new commit yet. If I do 'git pull --ff-only' command >> (with another git repository, created exactly the way mentioned in >> primer) at the same time, I see new commit in log output. It looks = like >> log is updated on merge, not fetch, judging from my previous litlle = bit >> of experience with git, so this maybe should be expected, I just do = not >> know. >=20 > No, the log isn't updated on `merge` (probably just sloppy wording), = what your log does is show the log of the local ref and you haven't = pulled anything into it yet. If you had done git log = refs/remotes/freebsd/main (or whatever that is on a bare repo), then = you'd have seen the updates. He did both the git fetch and a git merge (but not a fast forward merge). But he had cloned with --bare and: QUOTE from https://git-scm.com/docs/git-clone : --bare . . . Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/ . When this option is used, neither remote-tracking branches nor the related configuration variables are created. END QUOTE So things seem to be odd compared to the normal expected type of configuration for FreeBSD. >> So the big question - did I the right steps to achieve what I want, >> descibed in the beginning of this mail? Is this way OK to use, or >> should I use some other way to achieve this? >=20 > Yep, all looks perfectly fine, except you need to run git pull to = bring in remote changes. So usually `git fetch` to update your copy of = the remote refs, then `git pull --rebase` to bring in the changes into = your local copy of the ref _and_ update the checked out copy. >=20 > You might have to tweak all that a bit though for the bare repo case = with worktrees. >=20 It looks to me like he is using a configuration (--bare) outside the range FreeBSD is intending to deal with and so he needs his own fairly-unique procedures for using git for FreeBSD activity. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)