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

Re: git read-tree doesn't accept tree-ish

From
NBNikita Bobko <nikitabobko@gmail.com>
Date
Aug 23, 2021, 19:38 UTC
Message-ID
<CAMJzOtwwxKz3_cgpOOOx-tYE-qHUyMWfXu+dKEBHhz2Aov4MyQ@mail.gmail.com>
In-Reply-To
<xmqq5yvwq7w5.fsf@gitster.g>
> Have you tried `git restore --source=<hash> -- <path>` ?
At a glance, it looks what I am looking for
> Look for "--no-overlay" option in "git checkout", perhaps?
Oh, and it works too. So many ways to do almost exactly the same thing...

Anyway, thanks everyone for the help! My issue may be considered as resolved. Now I will dig into manpages and experiments to see which of the suggested variants suits me best

On Mon, Aug 23, 2021 at 9:27 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>
> Nikita Bobko <nikitabobko@gmail.com> writes:
>
> > `git checkout <hash> -- <path>` also doesn't work in my case because
> > if any file is removed in `<hash>` but not in my HEAD then `git
> > checkout` doesn't remove the file in my HEAD
>
> Look for "--no-overlay" option in "git checkout", perhaps?
Previous: Junio C Hamano
Message 7 of 7 in “git read-tree doesn't accept tree-ish”
  1. Nikita BobkoAug 23, 2021
  2. Elijah NewrenAug 23, 2021
  3. Jeff KingAug 23, 2021
  4. Nikita BobkoAug 23, 2021
  5. Elijah NewrenAug 23, 2021
  6. Junio C HamanoAug 23, 2021
  7. Nikita BobkoAug 23, 2021

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.