git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2022, 16:57 UTC
Message-ID
<xmqqo7ub4sfh.fsf@gitster.g>
In-Reply-To
<CABPp-BG=pm8gfRZNW8Rk1V77s40Do1FZy0mxH6epubHbzF8U5w@mail.gmail.com>
Elijah Newren <newren@gmail.com> 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.

Previous: Elijah Newren
Message 7 of 7 in “[suggestion] Fail cherry-pick if it overwrites untracked files with the matching file names”
  1. Rupinderjeet SinghOct 15, 2022
  2. Junio C HamanoOct 15, 2022
  3. Junio C HamanoOct 15, 2022
  4. Rupinderjeet SinghOct 15, 2022
  5. Junio C HamanoOct 16, 2022
  6. Elijah NewrenOct 16, 2022
  7. Junio C HamanoOct 16, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.