问题:
I am getting my feet wet on git and have the following issue: 我在git上弄湿了,并遇到以下问题:
My project source tree: 我的项目源代码树:
/
|
+--src/
+----refs/
+----...
|
+--vendor/
+----...
I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs
which is where the project picks them up from. 我的供应商分支中有代码(当前为MEF),我将在此处进行编译,然后将引用移至项目从中提取的/src/refs
中。
My issue is that I have my .gitignore
set to ignore *.dll
and *.pdb
. 我的问题是我将.gitignore
设置为忽略*.dll
和*.pdb
。 I can do a git add -f bar.dll
to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored. 我可以做一个git add -f bar.dll
来强制添加被忽略的文件,这是可以的,问题是我不知道列出哪些文件被忽略了。
I want to list the ignored files to make sure that I don't forget to add them. 我想列出被忽略的文件,以确保我不会忘记添加它们。
I have read the man page on git ls-files
and can not make it work. 我已经阅读了git ls-files
上的手册页,无法使其工作。 It seems to me that git ls-files --exclude-standard -i
should do what I want. 在我看来, git ls-files --exclude-standard -i
应该可以执行我想要的操作。 What am I missing? 我想念什么?
解决方案:
参考一: https://stackoom.com/question/1xQS/Git命令显示-gitignore忽略哪些特定文件参考二: https://oldbug.net/q/1xQS/Git-command-to-show-which-specific-files-are-ignored-by-gitignore
来源:oschina
链接:https://my.oschina.net/u/4428122/blog/4404397