Date: Tue, 26 Jan 2021 23:13:47 +0100 From: Milan Obuch <freebsd-git@dino.sk> To: Mark Millard <marklmi@yahoo.com> Cc: freebsd-git@freebsd.org Subject: Re: git setup/usage question Message-ID: <20210126231347.0d7c5a77@zeta.dino.sk> In-Reply-To: <CCD9FAB7-7075-43F8-989B-78CC14091913@yahoo.com> References: <CCD9FAB7-7075-43F8-989B-78CC14091913.ref@yahoo.com> <CCD9FAB7-7075-43F8-989B-78CC14091913@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Jan 2021 12:51:43 -0800, Mark Millard <marklmi@yahoo.com> 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 <path> > Run as if git was started in <path> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210126231347.0d7c5a77>