user10217630
user10217630

Reputation:

Give list of files in the "git status" for a particular file extension

If I type git status, i get the working tree status which included the files that have been modified.

I need to filter out for some specific file extension. Is this possible? (I'm using windows, and using the latest git version). For more information: using git bash.

Am working on a repository with more than 300 people, when I do git status, more than 1000 files will be there every week.

What is the solution here?

Upvotes: 1

Views: 94

Answers (1)

VonC
VonC

Reputation: 1324278

You can list files per extension

git ls-files -- \*.rb

Or you can list your changes (if you made any) with

git status -- \*.rb
# or, faster, with just the filename
git diff-index --name-only @ -- \*.rb

Upvotes: 1

Related Questions