From: Elijah Newren Date: Mon, 23 Aug 2021 19:23:23 GMT Subject: Re: git read-tree doesn't accept tree-ish Message-ID: In-Reply-To: Hi, On Mon, Aug 23, 2021 at 12:09 PM Nikita Bobko wrote: > > Yes, now I see. Thanks! > > I was trying to read state of a particular directory/file from a > particular revision into my index but so far didn't manage to do it > reliably. Please don't top-post on this list. > I was using `git read-tree :` and it doesn't work for > files (because they are blobs not tree-ish as you elaborated it to me) > and for directories, in my cases, it fails with not so helpful > message: > ``` > error: Entry '/' overlaps with '/'. Cannot bind. > ``` > > `git checkout -- ` also doesn't work in my case because > if any file is removed in `` but not in my HEAD then `git > checkout` doesn't remove the file in my HEAD Have you tried `git restore --source= -- ` ?