SKPS
SKPS

Reputation: 5836

List untracked files only by specific file type

I have a lot of untracked files in Git repo. How to list untracked files only by a specific file type, say *.py?

Upvotes: 1

Views: 64

Answers (1)

phd
phd

Reputation: 94425

git ls-files -o "*.py"

See the docs.

Upd. Quotes in "*.py" are required to prevent the shell to interpret *. With the quotes it is Git that interprets the file mask.

Upvotes: 2

Related Questions