friederbluemle
friederbluemle

Reputation: 37017

How do I display directories first using git ls-files

I am looking for something similar to the --group-directories-first parameter of ls for the command

git ls-files

Normally, the output is alphabetically sorted and looks like this:

anotherfile.c
directory/file.c
file.c

I want it to look like this:

directory/file.c
anotherfile.c
file.c

Upvotes: 2

Views: 144

Answers (1)

VonC
VonC

Reputation: 1324337

That does not seem to be supported (or even discussed in the Git mailing list)

Only some kind of command alias/output processing would return the desired output (like calling the command twice, once including "/" for getting all the path with folders, once excluding "/" for getting files only)

Upvotes: 1

Related Questions