Reputation: 5836
I have a lot of untracked files in Git repo. How to list untracked files only by a specific file type, say *.py?
*.py
Upvotes: 1
Views: 64
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.
"*.py"
*
Upvotes: 2