Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 May 2021 00:36:48 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Kurt Jaeger <pi@freebsd.org>
Cc:        git@freebsd.org
Subject:   Re: Ports tree have been migrated to git
Message-ID:  <CED55ACA-B06C-4278-B7B0-EE8EFA4109EE@FreeBSD.org>
In-Reply-To: <YI26YFiue7%2BjCcgc@fc.opsec.eu>
References:  <CAKBkRUzXAcXfFuD74VEPG0jAQBrmkQQdqAiBMR21vX3mA%2B4mkQ@mail.gmail.com> <YI2rkuT2W2bpPCpR@fc.opsec.eu> <CANCZdfpGx9SnSVPOBt0e5SOT0rzQbeOd%2BSZeMKTWkrXWZS3KMw@mail.gmail.com> <YI21Uht4hkDHwvvF@fc.opsec.eu> <1772D08D-CE66-4285-B8EE-2A353E7B91E2@FreeBSD.org> <YI26YFiue7%2BjCcgc@fc.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <pi@freebsd.org> wrote:
>=20
>> On 1 May 2021, at 22:08, Kurt Jaeger <pi@freebsd.org> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CED55ACA-B06C-4278-B7B0-EE8EFA4109EE>