有没有一种方法可以将一个目录添加到Git中,但是在.gitgnore文件中排除某些扩展名?
例如,当我执行添加目录的命令时:
例如,当我执行添加目录的命令时:
git add console/*
git 响应响应
$ git add console/*
The following paths are ignored by one of your .gitignore files:
console/networkprobing.ppu
console/opsdatamodule.lrs
console/opsdatamodule.o
console/opsdatamodule.ppu
console/rcacsSystemDM.compiled
console/rcacsSystemDM.o
console/rcacsSystemTestProcs.o
console/rcacsSystemTestProcs.ppu
Use -f if you really want to add them.
fatal: no files added
如何让命令自动排除 .gitignore 扩展名?是否需要传递额外的选项?
console/
目录下的所有文件了。如果不是,请问你的.gitignore
文件中都有哪些内容,又有哪些文件是你不想排除在外的呢? - CB Bailey