Visual Studio不认识GIT回购
在2022年Visual Studio中使用现有的GIT仓库打开我的ASP.NET核心项目后,Git Repo没有被加载。但是,从GitHub开设一个新的克隆该项目的仓库工作正常。并用GIT存储库开设其他项目正常工作。有什么问题?
Upon opening my ASP.NET Core project with an existing git repo in Visual Studio 2022, the git repo is not being loaded. However, opening a freshly cloned repo of this project from GitHub works fine. And opening other projects with git repos work fine. What could be the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在升级到最新版本的VS2019之后,也有同样的问题,并查看了“源控制 - git”的输出,存在致命错误的消息,因为没有访问并建议运行以下内容:
在运行并重新启动VS2019之后正常工作。
Had the same issue after upgrading to latest version of VS2019 and had a look at the output from "Source Control - Git", there were messages of a fatal error because of no access and suggesting running the following:
After running it and restarting VS2019 it works OK.
如果您以管理员的身份运行vs 2022,则应按照应有的方式加载所有内容。
If you run VS 2022 as an Administrator, it should load everything as it should.
在Win10下运行VS2022的问题相同。
问题是包含解决方案和GIT数据的文件系统目录的所有权已更改为管理员。将所有权更改回我的普通Windows用户帐户后,一切都可以很好地工作。
Had the same problem running VS2022 under Win10.
Problem was that the ownership of the file system directory containing the solution and git data had changed to Administrator. After changing the ownership back to my normal windows user account everything worked fine again.
就我而言,该项目由管理员权利克隆。所有这些都可以在控制台上工作,但视觉工作室没有读取.git文件夹。
实际上,文件夹具有针对所有子对象分配的经过身份验证的用户组的足够权利,但是Visual Studio仍然看不到.git文件夹。
只有在更改项目文件夹和所有子对象之后,都可以看到视频
录像带
In my case the project was cloned in console with Administrator rights. All worked good in console but Visual Studio was not read the .git folder.
Actually folders has enough rights for Authenticated Users group that was assigned for all child objects but Visual Studio still not see .git folder.
Only after change owner of project folder and all child objects to current account Visual Studio seen .git
Steps:
我遇到了同样的问题。
Visual Studio Code和Git Bash正确识别了回购,但没有Visual Studio 2022。
我在系统中安装了最新版本的Git,Visual Studio正确地识别了Git Repo。
I ran into the same problem.
Visual Studio Code and Git bash correctly recognized the repo but not Visual Studio 2022.
I installed the latest version of Git in the system, and the visual studio recognized the git repo correctly.