更新项目后git add .
时遇到如下提示,无法提交
The following paths are ignored by one of your .gitignore files:
data
Use -f if you really want to add them.
检查.gitignore
后发现data
已经添加进去了
最后发现自己的目录是/project/myproject/data
,在这里git add .
只会检查data
目录和data
子目录下的改动,需要返回到/project/myproject
目录执行。
网友评论