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

2 messages, 2 authors, 2021-08-23 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2021-08-23 19:27:11

Nikita Bobko [off-list ref] 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?

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

From: Nikita Bobko <hidden>
Date: 2021-08-23 19:38:03

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 [off-list ref] wrote:
Nikita Bobko [off-list ref] writes:
quoted
`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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help