RE: Make git ls-files omit deleted files
- From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
- Date
- Jan 12, 2024, 22:18 UTC
- Message-ID
- <038a01da45a5$47faf380$d7f0da80$@nexbridge.com>
- In-Reply-To
- <xmqqply68c87.fsf@gitster.g>
On Friday, January 12, 2024 4:37 PM, Junio C Hamano wrote:
Show 7 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? > >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.
Coupled with ls-files, using git status --porcelain might give some insight into what the condition of each modified and untracked file/directory is.