I'm trying to avoid showing unwanted folder's content (ex:- .settings, .metadata etc ) when i execute git status
command.
I modified .gitignore file after adding the folder names to it but still I'm getting all these files when I execute git status.
Run this from the git project directory, where dir
is directory you want to exclude.
git status . -- ':!dir'
For your example if want to exclude multiple directories (e.g. settings
and metadata
).
git status . -- ':!settings' ':!metadata'
According to the git glossary pathspec
, if you want a quick peek on the changes made to all the folder other than **/settings/
, here is how
git status ':(exclude,top)**/settings/*' ./
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With