error: file write error: No space left on device

error: file write error: No space left on device

我正在尝试通过执行“git 添加”来更新我的 git 存储库。在我的 MAC 上的 Visual Studio 代码内。我已经多次这样做没有问题,但这次它给了我这个错误“错误:文件写入错误:设备上没有 space”和“错误:无法创建临时文件:没有 space留在设备上。”此外,当尝试从 github 将另一个存储库克隆到我的设备时,它说“致命:无法创建工作树目录 'cs1550-project1-domm2':设备上没有 space” 我还剩下 12.96gb 256GB。我不知道我是怎么出来的 space 或如何释放它。我只需要为 class.

更新我的 github 仓库

这是 VS 终端中的 运行 df -h:

df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                                31G     0   31G   0% /dev
tmpfs                              6.2G  5.2M  6.2G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G   22G  165G  12% /
tmpfs                               31G     0   31G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                               31G     0   31G   0% /sys/fs/cgroup
/dev/sda2                          976M  310M  600M  35% /boot
/dev/loop0                          56M   56M     0 100% /snap/core18/2253
/dev/loop2                          62M   62M     0 100% /snap/core20/1270
/dev/loop1                          56M   56M     0 100% /snap/core18/2284
/dev/loop3                          44M   44M     0 100% /snap/snapd/14295
/dev/mapper/ubuntu--vg-lv_u        1.6T  1.6T     0 100% /u
/dev/loop6                          44M   44M     0 100% /snap/snapd/14549
/dev/loop5                          68M   68M     0 100% /snap/lxd/21835
/dev/loop4                          62M   62M     0 100% /snap/core20/1328
/dev/loop7                          68M   68M     0 100% /snap/lxd/21803
AFS                                2.0T     0  2.0T   0% /afs
tmpfs                              6.2G     0  6.2G   0% /run/user/16778380
tmpfs                              6.2G     0  6.2G   0% /run/user/16778801
tmpfs                              6.2G     0  6.2G   0% /run/user/16778557
tmpfs                              6.2G     0  6.2G   0% /run/user/16777582
tmpfs                              6.2G     0  6.2G   0% /run/user/16778716
tmpfs                              6.2G     0  6.2G   0% /run/user/16778813
tmpfs                              6.2G     0  6.2G   0% /run/user/16777367
tmpfs                              6.2G     0  6.2G   0% /run/user/16778536
tmpfs                              6.2G     0  6.2G   0% /run/user/16778347
tmpfs                              6.2G     0  6.2G   0% /run/user/16778708
tmpfs                              6.2G     0  6.2G   0% /run/user/16778462
tmpfs                              6.2G     0  6.2G   0% /run/user/16778799
tmpfs                              6.2G     0  6.2G   0% /run/user/16778330
tmpfs                              6.2G     0  6.2G   0% /run/user/16777512
tmpfs                              6.2G     0  6.2G   0% /run/user/16778756
tmpfs                              6.2G     0  6.2G   0% /run/user/16778555
tmpfs                              6.2G     0  6.2G   0% /run/user/16778783
tmpfs                              6.2G     0  6.2G   0% /run/user/16778747
tmpfs                              6.2G     0  6.2G   0% /run/user/16778712
tmpfs                              6.2G     0  6.2G   0% /run/user/16778329
tmpfs                              6.2G     0  6.2G   0% /run/user/16777696
tmpfs                              6.2G     0  6.2G   0% /run/user/16778494
tmpfs                              6.2G     0  6.2G   0% /run/user/16778816
tmpfs                              6.2G     0  6.2G   0% /run/user/16778752
tmpfs                              6.2G     0  6.2G   0% /run/user/16778706
tmpfs                              6.2G     0  6.2G   0% /run/user/16778823
tmpfs                              6.2G     0  6.2G   0% /run/user/16778556
tmpfs                              6.2G     0  6.2G   0% /run/user/16778766
tmpfs                              6.2G     0  6.2G   0% /run/user/16778343
tmpfs                              6.2G     0  6.2G   0% /run/user/16778828
tmpfs                              6.2G     0  6.2G   0% /run/user/16778538
tmpfs                              6.2G     0  6.2G   0% /run/user/16777510
tmpfs                              6.2G     0  6.2G   0% /run/user/16778809
tmpfs                              6.2G     0  6.2G   0% /run/user/16778353
tmpfs                              6.2G     0  6.2G   0% /run/user/16777596
tmpfs                              6.2G     0  6.2G   0% /run/user/16778342
tmpfs                              6.2G     0  6.2G   0% /run/user/16778822
tmpfs                              6.2G     0  6.2G   0% /run/user/16778540
tmpfs                              6.2G     0  6.2G   0% /run/user/16778542 

这是 运行 通过我的 MAC 终端:

df -h
Filesystem       Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1s5s1  233Gi   14Gi   12Gi    55%  553788 2447547532    0%   /
devfs           196Ki  196Ki    0Bi   100%     679          0  100%   /dev
/dev/disk1s4    233Gi  3.0Gi   12Gi    21%       4 2448101316    0%   /System/Volumes/VM
/dev/disk1s2    233Gi  320Mi   12Gi     3%    1226 2448100094    0%   /System/Volumes/Preboot
/dev/disk1s6    233Gi   24Mi   12Gi     1%      17 2448101303    0%   /System/Volumes/Update
/dev/disk1s1    233Gi  203Gi   12Gi    95%  576260 2447525060    0%   /System/Volumes/Data
map auto_home     0Bi    0Bi    0Bi   100%       0          0  100%   /System/Volumes/Data/home

df -i                 
Filesystem     512-blocks      Used Available Capacity iused      ifree %iused  Mounted on
/dev/disk1s5s1  489620264  29961272  24759664    55%  553788 2447547532    0%   /
devfs                 392       392         0   100%     679          0  100%   /dev
/dev/disk1s4    489620264   6294912  24759664    21%       4 2448101316    0%   /System/Volumes/VM
/dev/disk1s2    489620264    654696  24759664     3%    1226 2448100094    0%   /System/Volumes/Preboot
/dev/disk1s6    489620264     49528  24759664     1%      17 2448101303    0%   /System/Volumes/Update
/dev/disk1s1    489620264 426413408  24759664    95%  576260 2447525060    0%   /System/Volumes/Data
map auto_home           0         0         0   100%       0          0  100%   /System/Volumes/Data/home

这取决于您尝试在何处执行 git add .

作为mentioned here:

The /snap mounts come from using software packages installed with Snap.

These utilize loop devices and are usually not writable.

You will get some sort of "No space on device" error when trying to write to any of these locations and that is represented in df -h as showing those mounts as 100% in use.

但在您的情况下,假设存储库位于 /dev/...:

devfs                 392       392         0   100%     679          0  100%   /dev

这意味着您没有足够的 inode。
查找要删除的文件:

for x in /* ; do echo $x ; find $x | wc -l ; done

目标是free inode usage or increase the number of inodes