我的.gitignore文件包含以下行:
make/
!make/*.mak
当我运行“git add make / file.mak”时,我收到以下错误:
The following paths are ignored by one of your .gitignore files:
make
Use -f if you really want to add them.
fatal: no files added
为什么在将make / file.mak添加到例外列表时出现此错误?
答案 0 :(得分:2)
因为make/
本身尚未被覆盖。将第一行更改为/make/*
。