Re: Make git ls-files omit deleted files
- From
- Raul Rangel <rrangel@google.com>
- Date
- Jan 12, 2024, 21:50 UTC
- Message-ID
- <CAHQZ30AZjqC9t9xDo407FEo3sDUDOSApOwMP_3Pm2nv7itttQQ@mail.gmail.com>
- In-Reply-To
- <xmqqply68c87.fsf@gitster.g>
On Fri, Jan 12, 2024 at 2:37 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> > Raul Rangel <rrangel@google.com> writes: > > > I'm trying to copy my current git worktree to a new directory, while > > including all modified and untracked files, but excluding any ignored > > files. > > Curiously missing from the above is "unmodified". You only talked > about modified, untracked, and ignored, but what do you want to do > with them?
I guess another way of saying it is, I want to make a copy of the worktree while honoring .gitignore. i.e., I don't want my copied work tree to contain any ignored files.
> > As you are grabbing the files from the working tree, I suspect that > you do not want to base your decision on what is in the index, which > means that ls-files might be a wrong tool for the job.
Hrmm, that makes sense. Do you have any recommendations?