我有一个目录结构,如下所示。/是Git代码库的基础,而不是root。我只是初始化了repo,还没有将它连接到任何远程存储库。
/ (In here is just a .dm file I want)
/LodumViralDeath/ (In here are some .tga files I want to keep)我在/中添加了一个.gitignore文件,如下所示。
*
!LodumViralDeath.dm
!LodumViralDeath/在/LodumViralDeath/中有几个.tga文件,但是在我处于Git状态时,git不会提取其中的任何文件,而是显示以下内容。
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# LodumViralDeath.dm
# LodumViralDeath/不确定如何让它识别二进制.tgas存在的事实!
作为一个健全的检查,下面是目录清单。/等于/c/dominions3/mods/
$ pwd
/c/dominions3/mods/LodumViralDeath
$ ls
boomer1.tga boomer2.tga cultivatedBrainMass1.tga cultivatedBrainMass2.tga lodumbanner.tga slimeDippedNecromancer1.tga slimeDippedNecromancer2.tga smokestack1.tga smokestack2.tga发布于 2013-07-18 12:20:50
看起来你只是被git status的输出搞糊涂了。当git status显示类似以下行的目录时:
# LodumViralDeath/这意味着该文件夹中有一定数量的文件(在本例中是未跟踪的)。它只显示文件夹,以保持较短的输出。
如果希望git status显示每个文件,请使用
git status -uhttps://stackoverflow.com/questions/17714169
复制相似问题