简体   繁体   English

如何在Windows 7中删除Git本地存储库文件夹

[英]How to delete a git local repo folder in windows 7

I have created git clone in local directory. 我已经在本地目录中创建了git clone。 Then I have run npm and also installed some node packages(gulp etc). 然后我运行了npm并安装了一些节点程序包(gulp等)。 But I don't want now the working directory. 但是我现在不想要工作目录。 So I just did right click mouse and delete, I am not able to delete. 因此,我只是右键单击鼠标并删除,但无法删除。 I am getting the below error. 我收到以下错误。

"The source file name(s) are larger than is supported by the file system. Try moving to a location which has shorter path name, or try renaming to shorted name(s) before attempting this operation" “源文件名大于文件系统支持的文件名。尝试移至路径名较短的位置,或尝试重命名为短名称,然后再尝试执行此操作”

What would be the issue. 会是什么问题。

On Windows, this thread shows that it can be: 在Windows上, 此线程表明它可以是:

  • a path length issue (the path is too long) 路径长度问题(路径太长)
  • a process issue (which keeps an handle on one of the files being deleted) 进程问题(可处理要删除的文件之一)

I found out make a drive mapping about halfway into the folder structure you should be able to delete the latter half of the file heirarcy. 我发现制作了一个映射到文件夹结构一半的驱动器,您应该能够删除文件继承关系的后半部分。

For example if you are getting the error trying to delete: 例如,如果遇到尝试删除的错误:

\\NAS.Device.Company.com\a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z

Then map a network drive Z: to 然后将网络驱动器Z:映射到

\\NAS.Device.Company.com\a\b\c\d\e\f\g\h\i\j\k\

This will reduce the file herarchy down to a smaller path. 这会将文件层次结构减小到较小的路径。
Open explorer and view the Z: drive. 打开资源管理器并查看Z:驱动器。 It should contain a folder called L (in this example). 它应该包含一个名为L的文件夹(在此示例中)。

You should now be able to delete the L and its subfolders without an issue, thereby deleting half the folder hierarchy. 现在,您应该能够删除L及其子文件夹,而不会出现问题,从而删除了一半的文件夹层次结构。
After that, disconnect the Z: drive and try to delete whatever is left normally. 之后,断开Z:驱动器,然后尝试删除正常剩余的内容。
Problem solved! 问题解决了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM