How can I see list of ignored files in git?

后端 未结 3 1240
轮回少年
轮回少年 2021-01-06 06:41

I have been using git from past few months and I like git. I was wondering if there is a command which can show list of ignored files in a project.

I tried this

3条回答
  •  不知归路
    2021-01-06 07:22

    You can use the clean command with the option:

    -n, --dry-run - Don't actually remove anything, just show what would be done

    git clean -ndX 
    

    In this way git will list all the files that would be cleaned without doing anything, and you get a list of ignored files.

提交回复
热议问题