Re: What is the reason behind not hiding git worktrees from git?
- From
- Jason Cho <jason11choca@proton.me>
- Date
- Sep 27, 2025, 21:08 UTC
- Message-ID
- <KUIfhZpMUwujq7A0Qdiri2OEhWabUXUVVpHZb7o0A-iqAC_46qQd5acUqN9TlkFMGe2t-aY4IXFQCjs6gKsawBCGSazI3QDPigdI7KrRf_A=@proton.me>
- In-Reply-To
- <aNglDzeOT5_4ZbdV@kitsune.suse.cz>
> It does not not show its own .git directory as untracked files > > That can be seen as inconsistent.
Well, I see your point. Since the .git directory is from a git repo, the directory is ignored by git. Therefore, you want git to also ignore other items derived from the repo, including work trees.
However, this is a minor improvement and I suspect your proposed feature may have an unknown impact.
Anyway, what's your real use case? Do you really add hundreds of work trees within the same repo directory so that you hate to see them in git status?