Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git warning "unable to access permission denied" on a .gitignore directory

Tags:

git

gitignore

I have a sub-directory called ".gitignore" in one of my directories called "Database", which I want git to ignore, so I listed it in my .gitingore file.

.gitignore:

    [Bb]in/
    [Dd]ebug/
    [Rr]elease/
    .gitignore/

When I perform a command like git status Database, i get the following warning:

warning: unable to access 'Database/.gitignore': Permission denied

Can anyone please help me understand what I can do to get rid of this warning?

PS: I verified folder permissions on both "Database" and ".gitingore" were the same.

PS: I am running git on Windows 8. I don't think this matters.

like image 441
Parth Shah Avatar asked Mar 18 '23 20:03

Parth Shah


1 Answers

I'm not sure what you're experiencing but I would imagine that having a folder called .gitignore is a bad idea. Git might be trying to open it and read it like a file as it needs to know the contents of .gitignore files.

Try calling it something else and then adding its name to a .gitignore file next to it in the directory.

like image 73
MichaelJones Avatar answered Mar 22 '23 10:03

MichaelJones