开发者

cannot git add.gitignore

I inputted the following:

mkdir project_name
cd project_name
git init
touch .gitignore
git add .gitignore

I got the following response:

The following paths are ignored by one of your .gitignore files:
.gitignore
Use -f if you really want to add them.
fatal: no files added

I couldn't find any gitignore fil开发者_运维知识库es that could cause this. Is there a recommended way to find out what is causing the issue?


It seems the file is ignored in the global ignore definition.

Search for the ~/.gitignore_global file and remove the line with .gitignore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜