git warning “unable to access permission denied” o

2019-02-26 20:17发布

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.

标签: git gitignore
2条回答
三岁会撩人
2楼-- · 2019-02-26 21:04

Copy your .gitignore file and paste it on your desktop. Then open it and make changes. Delete previous file in your folder and paste updated one.

Hidden files cannot be replaced or edited.

查看更多
该账号已被封号
3楼-- · 2019-02-26 21:09

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.

查看更多
登录 后发表回答