Ports tree have been migrated to git
Kurt Jaeger
pi at freebsd.org
Sun May 2 06:48:50 UTC 2021
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 at FreeBSD.org +49 171 3101372 Now what ?
More information about the freebsd-git
mailing list