Subject: Re: [suggestion] Fail cherry-pick if it overwrites untracked files with the matching file names

From: Junio C Hamano <[email-masked]>
Date: Sun, 16 Oct 2022 09:57:54 -0700

Elijah Newren <[email-masked]> writes:

> There is a command line option meant to allow tweaking this behavior:
> --[no-]overwrite-ignore.

Ah, I totally forgot that relatively recent invention.  Thanks for
bringing it up.

I personally consider it a bit too blunt an instrument, and in the
longer term, it would probably be a better direction to introduce a
new class of paths that are not tracked, and call the class
"precious", which (1) is similar to "ignored" in that the paths in
the class do not get added with "git add ." but (2) unlike "ignored"
but like "untracked", they are not considered to be expendable.

Until that happens, though, treating all "ignored" paths as if they
are "precious" may be a usable workaround.