From owner-freebsd-git@freebsd.org Tue Jan 26 22:13:51 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 EAA3D4E2946 for ; Tue, 26 Jan 2021 22:13:51 +0000 (UTC) (envelope-from freebsd-git@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQLby4lBVz4YLJ for ; Tue, 26 Jan 2021 22:13:50 +0000 (UTC) (envelope-from freebsd-git@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Tue, 26 Jan 2021 23:13:48 +0100 id 00F40414.6010941C.000072D4 Date: Tue, 26 Jan 2021 23:13:47 +0100 From: Milan Obuch To: Mark Millard Cc: freebsd-git@freebsd.org Subject: Re: git setup/usage question Message-ID: <20210126231347.0d7c5a77@zeta.dino.sk> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; i386-portbld-freebsd11.4) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DQLby4lBVz4YLJ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-git@dino.sk designates 84.245.65.72 as permitted sender) smtp.mailfrom=freebsd-git@dino.sk X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dino.sk]; RBL_DBL_DONT_QUERY_IPS(0.00)[84.245.65.72:from]; SPAMHAUS_ZRD(0.00)[84.245.65.72:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.998]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5578, ipnet:84.245.64.0/18, country:SK]; 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: Tue, 26 Jan 2021 22:13:52 -0000 On Tue, 26 Jan 2021 12:51:43 -0800, Mark Millard wrote: > Milan Obuch freebsd-git at dino.sk wrote on > Tue Jan 26 14:10:29 UTC 2021 : > > > # git clone --config > > remote.freebsd.fetch='+refs/notes/*:refs/notes/*' --bare > > https://git.freebsd.org/src.git /mnt/src/.git # git -C > > /mnt/src/.git worktree add /mnt/src/main main # git -C > > /mnt/src/.git worktree add /mnt/src/13 stable/13 # git -C > > /mnt/src/.git worktree add /mnt/src/12 stable/12 # git -C > > /mnt/src/.git worktree add /mnt/src/11 stable/11 > . . . > > # git -C /mnt/src/.git merge > > fatal: this operation must be run in a work tree > > > > 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. > > man git reports: > > -C > Run as if git was started in instead of the current > working directory. . . . > > So it looks to me like you need to do one or > more of something like: > > # git -C /mnt/src/main merge > # git -C /mnt/src/stable/13 merge > # git -C /mnt/src/stable/12 merge > # git -C /mnt/src/stable/11 merge > > /mnt/src/.git is not a working directory. > [ snip ] Thanks for hints, this does explain a bit from what I see, however something is still missing. When I tried what you wrote # git -C /mnt/src/main merge or what I made from reading man pages and Git Book referenced in Git Primer, # git -C /mnt/src/.git --work-tree /mnt/src/main merge all I get is fatal: No remote for the current branch. so evidently no merge is actually done. Something in my setup is wrong or missing. It's late here now, tomorrow will be another day to try something :) Regards, Milan