Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Apr 2026 12:44:13 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Git balks at untracked files in zfs
Message-ID:  <CANCZdfoJBHjdwSnHak3mVMJtTiZjwmzwdf8AQUq%2BPoG-Xsehdw@mail.gmail.com>
In-Reply-To: <ae0A2tmfM9W5fKhO@www.zefox.net>

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

[-- Attachment #1 --]
So first off, do you have files you want to keep? If not, then read on.

On Sat, Apr 25, 2026 at 11:58 AM bob prohaska <fbsd@www.zefox.net> wrote:

> For the last few git pull sessions git has been reporting
> error: The following untracked working tree files would be overwritten by
> merge:
>         share/man/man4/appleir.4
>         sys/compat/linuxkpi/common/include/linux/hex.h
>         sys/contrib/openzfs/.github/workflows/zfs-arm.yml
>         sys/contrib/openzfs/man/man1/dbufstat.1
>         sys/contrib/openzfs/tests/zfs-tests/cmd/clone_after_trunc.c
>
> sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_userprop.ksh
> .... and so forth. It looks like all the complaints are about openzfs
>
> Runnig git reset --hard appears to clear the error:
> root@www:/usr/src # git reset --hard
> HEAD is now at 2b954770ddd nvme: Use passed in max_pages.
>
> If I re-run git pull the system reports an update available and fails
> again:
> root@www:/usr/src # git pull
> Updating 2b954770ddd..7f207b6443f
> error: The following untracked working tree files would be overwritten by
> merge:
>         share/man/man4/appleir.4
>         sys/compat/linuxkpi/common/include/linux/hex.h
>         sys/contrib/openzfs/.github/workflows/zfs-arm.yml
>         sys/contrib/openzfs/man/man1/dbufstat.1
>         sys/contrib/openzfs/tests/zfs-tests/cmd/clone_after_trunc.c
>
> sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_userprop.ksh
> and so forth.
>
> It looks like I'm stuck, is there a way to get unstuck?
>

git clean -dn

this will give you a list of files that will be deleted, updated, etc. If
the list looks good then

git clean -f
or
git clean -i

The former blows everything from the prior step away. The latter asks one
by one. If this is supposed to
be a completely clean tree, you can start here. If you have like a kernel
config or something, then you'll
want to proceed with caution.

Warner


> Thanks for reading,
>
> bob prohaska
>
>
>

[-- Attachment #2 --]
<div dir="ltr"><div>So first off, do you have files you want to keep? If not, then read on.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Apr 25, 2026 at 11:58 AM bob prohaska &lt;<a href="mailto:fbsd@www.zefox.net">fbsd@www.zefox.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For the last few git pull sessions git has been reporting<br>
error: The following untracked working tree files would be overwritten by merge:<br>
        share/man/man4/appleir.4<br>
        sys/compat/linuxkpi/common/include/linux/hex.h<br>
        sys/contrib/openzfs/.github/workflows/zfs-arm.yml<br>
        sys/contrib/openzfs/man/man1/dbufstat.1<br>
        sys/contrib/openzfs/tests/zfs-tests/cmd/clone_after_trunc.c<br>
        sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_userprop.ksh<br>
.... and so forth. It looks like all the complaints are about openzfs<br>
<br>
Runnig git reset --hard appears to clear the error:<br>
root@www:/usr/src # git reset --hard<br>
HEAD is now at 2b954770ddd nvme: Use passed in max_pages.<br>
<br>
If I re-run git pull the system reports an update available and fails again:<br>
root@www:/usr/src # git pull<br>
Updating 2b954770ddd..7f207b6443f<br>
error: The following untracked working tree files would be overwritten by merge:<br>
        share/man/man4/appleir.4<br>
        sys/compat/linuxkpi/common/include/linux/hex.h<br>
        sys/contrib/openzfs/.github/workflows/zfs-arm.yml<br>
        sys/contrib/openzfs/man/man1/dbufstat.1<br>
        sys/contrib/openzfs/tests/zfs-tests/cmd/clone_after_trunc.c<br>
        sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_userprop.ksh<br>
and so forth.<br>
<br>
It looks like I&#39;m stuck, is there a way to get unstuck?<br></blockquote><div><br></div><div>git clean -dn</div><div><br></div><div>this will give you a list of files that will be deleted, updated, etc. If the list looks good then</div><div><br></div><div>git clean -f</div><div>or</div><div>git clean -i</div><div><br></div><div>The former blows everything from the prior step away. The latter asks one by one. If this is supposed to</div><div>be a completely clean tree, you can start here. If you have like a kernel config or something, then you&#39;ll</div><div>want to proceed with caution.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks for reading,<br>
<br>
bob prohaska<br>
<br>
<br>
</blockquote></div></div>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoJBHjdwSnHak3mVMJtTiZjwmzwdf8AQUq%2BPoG-Xsehdw>