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
.
精彩评论