From owner-freebsd-git@freebsd.org Sat May 1 22:37:00 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 52A0F63B57A for ; Sat, 1 May 2021 22:37:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FXkcr1nF8z3FbP for ; Sat, 1 May 2021 22:37:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id 3A71063B627; Sat, 1 May 2021 22:37:00 +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 390A763B792 for ; Sat, 1 May 2021 22:37:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FXkcr0sgHz3FbN; Sat, 1 May 2021 22:37:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id EC11B5234; Sat, 1 May 2021 22:36:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (unknown [IPv6:2001:470:7a58:0:e0d3:13d5:7e22:8d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1E36E5A030; Sun, 2 May 2021 00:36:58 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_45035E78-13DF-4FA5-997A-DB58B061B3E2"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: Ports tree have been migrated to git Date: Sun, 2 May 2021 00:36:48 +0200 In-Reply-To: Cc: git@freebsd.org To: Kurt Jaeger References: <1772D08D-CE66-4285-B8EE-2A353E7B91E2@FreeBSD.org> X-Mailer: Apple Mail (2.3654.80.0.2.43) 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: Sat, 01 May 2021 22:37:00 -0000 --Apple-Mail=_45035E78-13DF-4FA5-997A-DB58B061B3E2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 1 May 2021, at 22:30, Kurt Jaeger wrote: >=20 >> On 1 May 2021, at 22:08, Kurt Jaeger wrote: >> ... >>> I just want to be back in the state where git show does not show >>> any changes 8-} >>=20 >> git checkout origin/main >> git branch -d main (you might have to use -D here if it doesn't want = to get rid of the branch) >> git checkout main >>=20 >> And voila. >=20 > # 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. > Ok, I deleted those, but then >=20 > git show >=20 > shows me details of >=20 > commit 7e1519526b60a1437ac59ecabc24fe7ff30fe127 (HEAD -> main, = origin/main, origin/HEAD) >=20 > I then tried the next step: >=20 > $ 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. In this case you should probably use "git reset --hard", like Warner suggested. After using this, use a regular "git pull" to get your local main branch in sync with origin/main again. -Dimitry --Apple-Mail=_45035E78-13DF-4FA5-997A-DB58B061B3E2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYI3YAAAKCRCwXqMKLiCW o+lPAJwIhzVLMZGfwnopfeA6Bj8u/luOjwCfVUKo7da3NBiVx6PYVxdySYDEzRA= =Lf5K -----END PGP SIGNATURE----- --Apple-Mail=_45035E78-13DF-4FA5-997A-DB58B061B3E2--