From nobody Sat Dec 03 08:48:52 2022 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 4NPNlL3nFFz4k2Fv for ; Sat, 3 Dec 2022 08:49:02 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (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 "anubis.delphij.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NPNlK5Sc1z4Cpv for ; Sat, 3 Dec 2022 08:49:01 +0000 (UTC) (envelope-from delphij@delphij.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=delphij.net header.s=m7e2 header.b=VMOMhgih; spf=pass (mx1.freebsd.org: domain of delphij@delphij.net designates 2001:470:1:117::25 as permitted sender) smtp.mailfrom=delphij@delphij.net; dmarc=pass (policy=reject) header.from=delphij.net Received: from odin.corp.delphij.net (unknown [IPv6:2001:470:48ca:5:4cd3:7719:35aa:6a80]) by anubis.delphij.net (Postfix) with ESMTPSA id BD8852FEFD; Sat, 3 Dec 2022 00:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=m7e2; t=1670057333; x=1670071733; bh=cFwEvz6LTcgg+yHM+bcBWcESMJ+iS5pGj1iwQjLME30=; h=Date:Reply-To:To:References:From:Subject:In-Reply-To; b=VMOMhgihoSr1+wm8a0QtLiyumNyIYgxRzNULyBSZzO9d4qj0uok62Mq2bhG9Tt8Iy kLXXNvVTJUUVdeNAOQxLzFAsOHjS39btNcJ6V9AZEId7Eb4pwziOh767ol5rO1wVPe lQKhEIaaH3scVG2okqZooZYKpRoISLFqunX5TUJFHHnpR2GFZcNN9o0XXmiSh/cONK JVR1jY6BIKDwIO+BDmjB3dXUxT4ldq8pM0IDyXEYOfOdTJqBQRv3606diVDIsvqlFX +AFQYlvOjJfuc2aD5M2x1hSNNG1b84EJ51QZYLlKoPgZ2Mb6qqkGyFvxDvlB9Alo41 kPo11F4iFsITQ== Message-ID: Date: Sat, 3 Dec 2022 00:48:52 -0800 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 User-Agent: Thunderbird Reply-To: d@delphij.net Content-Language: en-US To: freebsd-git@freebsd.org References: From: Xin Li Subject: Re: git-switch(1) then git-pull(1) In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.983]; DMARC_POLICY_ALLOW(-0.50)[delphij.net,reject]; R_DKIM_ALLOW(-0.20)[delphij.net:s=m7e2]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; DKIM_TRACE(0.00)[delphij.net:+]; MLMMJ_DEST(0.00)[freebsd-git@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[d@delphij.net]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[delphij]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4NPNlK5Sc1z4Cpv X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 2022-12-02 4:08 AM, Nuno Teixeira wrote: > Not sure if I understand but I use `git switch` on ports tree to switch > from 'main' to 'quarterly' to avoid having 2 trees. Somewhat unrelated to the original topic, but why would one want to avoid having two trees? Personally I would use a worktree for this purpose, like: $ git clone https://git.freebsd.org/ports ports/main $ cd ports/main $ git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4 Then both trees would share the same set of git objects; after use the worktree can be deleted with: $ git worktree remove 2022Q4 This is a lot easier than switching between branches, especially when the two branches diverged a lot (like src/). Cheers,