开发者

cannot git add.gitignore

开发者 https://www.devze.com 2023-01-29 07:14 出处:网络
Iinputted the following: mkdir project_name cd project_name git init touch .gitignore git add .gitignore I got the following response:

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

精彩评论

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