【问题标题】:GIT fatal: unable to write new_index fileGIT 致命:无法写入 new_index 文件
【发布时间】:2014-10-25 09:00:51
【问题描述】:

我使用Ctrl+C 中断了git add -A 命令 然后我跑

git reset --mixed

现在我再次执行git add -A 然后git commit -m "message" 但我明白了

fatal: unable to write new_index file

的输出
git status:

# On branch master
nothing to commit (working directory clean)

您能帮我提交更改吗?

ps 我的磁盘有足够的空间

【问题讨论】:

  • 这会有帮助吗?你在什么操作系统上?你用的是什么版本的git?
  • 我正在运行 Linux。 git 版本 1.7.1
  • 首先,检查升级到最新的Git版本(2.1+)后问题是否仍然存在:stackoverflow.com/a/20918469/6309:使用ppa launchpad.net/~git-core/+archive/ubuntu/ppa
  • 嗨,不幸的是,我无法在这台机器上更新它(Linux 集群......我没有权限)我使用 git 已经有一段时间了,这是我第一次拥有这个问题...
  • 然后尝试再次克隆 repo,并从新克隆尝试git add --work-tree=/path/to/old/repo -A,然后(仍然来自新克隆)git commit -m "message"(这次没有--work-tree)跨度>

标签: git git-commit git-add


【解决方案1】:

该错误似乎与配额问题有关。

Disk quota exceeded

...但我的硬盘中有 41.3 GB

这与可用磁盘空间无关。使用quota -s 检查您的配额。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,发现是文件权限问题。我使用不同的用户创建了存储库,当我尝试在 git 中执行任何操作时,我得到“权限被拒绝”的 fetch 和“无法写入 new_index 文件”。

    因此,请检查存储库根目录的权限,并确保用户有权写入该目录

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-10
      • 2011-04-18
      • 1970-01-01
      • 2017-10-14
      • 2013-05-12
      • 2011-12-13
      • 2016-09-02
      • 2012-12-09
      相关资源
      最近更新 更多