How to list files in git only upto n-levels? -
i want list files tracked in git repository.
so, git ls-files. doing so, gives me entire list including sub-directories, sub-directories , on..
i not want this. there way can specify depth of output of ls-files command?
suppose have git repo:
mainrepo/ sub-dir1 subdir1.1 subdir1.1.1 sub-dir2 i want go depth 1, perse. means want ls-files ouput
sub-dir1 sub-dir2
a rudimentary way strip each line (and including) optional / character, , unique lines that:
$ git ls-files | cut -f1 -d/ | uniq (note haven't been able test yet, because i'm on windows using limited bash shell.)
Comments
Post a Comment