git警告“无法访问权限被拒绝";在.gitignore目录上

编程入门 行业动态 更新时间:2024-10-28 18:23:10
本文介绍了git警告“无法访问权限被拒绝";在.gitignore目录上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在我的一个名为数据库"的目录中有一个名为".gitignore"的子目录,我希望git忽略它,因此我将其列在我的.gitingore文件中.

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:

.gitignore:

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

当我执行git status Database之类的命令时,收到以下警告:

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:我验证了数据库"和".gitingore"的文件夹权限是相同的.

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

PS:我在Windows 8上运行git.我认为这无关紧要.

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

推荐答案

我不确定您遇到了什么,但我想拥有一个名为.gitignore的文件夹是个坏主意. Git可能正试图打开它并像读取文件一样读取它,因为它需要知道.gitignore文件的内容.

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.

尝试使用其他名称,然后将其名称添加到目录中位于其旁边的.gitignore文件中.

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

更多推荐

git警告“无法访问权限被拒绝";在.gitignore目录上

本文发布于:2023-10-21 19:59:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1515258.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被拒   访问权限   目录   git   gitignore

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!