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

后端 未结 9 1251
我在风中等你
我在风中等你 2020-11-22 05:07

I am getting my feet wet with Git and have the following issue:

My project source tree:

/
|
+--src/
+----refs/
+----...
|
+--vendor/
+----...
         


        
9条回答
  •  無奈伤痛
    2020-11-22 05:43

    Assuming there are a few ignore directories, why not use "git status node/logs/" which will tell you what files are to be added? In the directory I have a text file that is not part of status output, e.g.:

    On branch master
    Your branch is up-to-date with 'origin/master'.
    Untracked files:
    (use "git add ..." to include in what will be committed)

        node/logs/.gitignore 
    

    .gitignore is:

    *

    !.gitignore

提交回复
热议问题