Hi,
I'm a big user of git clean -fdx which is the shortest path to a clean worktree.
However, I repeatedly found myself deleting precious git ignored resources such as editor/debug configurations so I asked myself if the git ignore mechanism could be applied to git clean so that we can declare a list of patterns git clean should never remove.
I launched an AI agent on this and here is the result: https://github.com/sylr/git/commit/13d0177c52130782bcf7877895a5b497abdfba86
Since I'm no C developer I'm not really qualified to review the AI output but it seems to do what I wanted. I'm not expecting it to be merged but I am wondering if this is a feature git would be likely to implement ?
Regards.
-- Sylvain Rabot <sylvain@abstraction.fr>