0

I want to understand the exclude pattern in git ls-files command. So I want to output all the ignored file within the working directory using the ls-files command. I know that git status --ignored will do the job, but my point is to understand using the exclude pattern in case I need it.

I tried this: git ls-files -i -x ./*.txt In order to output all the ignored (except text-files) files. No success though I have several ignored files.

Could you please help me with this?

2 Answers 2

1

try git ls-files -o -i -x '*.txt'

Sign up to request clarification or add additional context in comments.

Comments

0

A simple StackOverflow search would have answered your question.

Try any of these:

git ls-files --others -i --exclude-from=.git/info/exclude git ls-files --others -i --exclude-standard 

Reference: Git command to show which specific files are ignored by .gitignore

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.