From owner-freebsd-git@freebsd.org Sun May 2 06:48:50 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 03F965FADC9 for ; Sun, 2 May 2021 06:48:50 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FXxXK6lWSz3tQv for ; Sun, 2 May 2021 06:48:49 +0000 (UTC) (envelope-from pi@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id E5BAD5FADC8; Sun, 2 May 2021 06:48:49 +0000 (UTC) Delivered-To: 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 E45845FACAB for ; Sun, 2 May 2021 06:48:49 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from fc.opsec.eu (fc.opsec.eu [IPv6:2001:14f8:200:4::4]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FXxXK620Zz3tt6; Sun, 2 May 2021 06:48:49 +0000 (UTC) (envelope-from pi@freebsd.org) Received: from pi by fc.opsec.eu with local (Exim 4.94 (FreeBSD)) (envelope-from ) id 1ld5uH-000BDz-TK; Sun, 02 May 2021 08:48:45 +0200 Date: Sun, 2 May 2021 08:48:45 +0200 From: Kurt Jaeger To: Dimitry Andric Cc: git@freebsd.org Subject: Re: Ports tree have been migrated to git Message-ID: References: <1772D08D-CE66-4285-B8EE-2A353E7B91E2@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4FXxXK620Zz3tt6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Sun, 02 May 2021 06:48:50 -0000 Hi! > > # git checkout origin/main > > error: The following untracked working tree files would be overwritten by checkout: > > multimedia/transcode/files/patch-import_demux__pass.c > > multimedia/transcode/files/patch-import_extract__ac3.c > > multimedia/transcode/files/patch-import_extract__mp3.c > > multimedia/transcode/files/patch-import_extract__pcm.c > > [...] > > Please move or remove them before you switch branches. > > [...] > > Ah yes, I was assuming that you were starting with a clean tree. In this > case you could have used "git stash" to stash away the changes, and get > them back later. # git stash No local changes to save > > Ok, I deleted those, but then > > > > git show > > > > shows me details of [...] > > $ git branch -d main > > error: Cannot delete branch 'main' checked out at '/pou/ports/default' > > $ git branch -D main > > error: Cannot delete branch 'main' checked out at '/pou/ports/default' > > That means you are using worktrees, so indeed then you cannot delete the > main branch, as that other location is using it. I was not aware that I use a worktree, but this is the list of worktrees in use: # git worktree list /pou/ports/default 7e1519526 [main] git worktree remove /pou/ports/default fatal: '/pou/ports/default' is a main working tree > In this case you should probably use "git reset --hard", like Warner > suggested. # git reset --hard HEAD is now at 7e1519526 textproc/uim: Fix incorrect use of USE_RUBY. > After using this, use a regular "git pull" to get your local > main branch in sync with origin/main again. Done, now git show lists $ git show #ommit dc5a6492de7a0b3e79d48a02f4678c5af4467e40 (HEAD -> main, origin/main, origin/HEAD) [...] Again I expected that 'git show' does not display anything, as I should be in the state of a pristine repo without anything to show ? -- pi@FreeBSD.org +49 171 3101372 Now what ?