Re: Git balks at untracked files in zfs

From: Bakul Shah <bakul_at_iitbombay.org>
Date: Sat, 25 Apr 2026 18:50:51 UTC
git clean -x will remove even more gunk. git -xn to see what.

> On Apr 25, 2026, at 11:44 AM, Warner Losh <imp@bsdimp.com> wrote:
> 
> 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
> 
>