2

I interrupted a git add -A command using Ctrl+C and then I run

git reset --mixed

Now I executed again git add -A and then git commit -m "message" but I get

fatal: unable to write new_index file

The output of

git status:

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

Can you help me in committing my changes?

ps I have enough space in my disk

gabboshow
  • 5,359
  • 12
  • 48
  • 98
  • Would this help? On what OS are you? What version of git are you using? – VonC Sep 01 '14 at 07:22
  • I'm running Linux. git version 1.7.1 – gabboshow Sep 01 '14 at 07:32
  • First, check if the issue persists after upgrading to the latest Git release (2.1+): http://stackoverflow.com/a/20918469/6309: use the ppa https://launchpad.net/~git-core/+archive/ubuntu/ppa – VonC Sep 01 '14 at 07:33
  • Hi, unfortunately I can't update it on this machine (linux cluster...I don't have permissons) anyway I used git since a while now and this is the first time I had this problem... – gabboshow Sep 01 '14 at 07:35
  • Then try to clone the repo again, and try from that new clone a `git add --work-tree=/path/to/old/repo -A`, followed by (still from the new clone) a `git commit -m "message"` (no `--work-tree` this time) – VonC Sep 01 '14 at 07:38
  • the output of git status is: nothing to commit (working directory clean)...can it help? – gabboshow Sep 01 '14 at 07:40
  • Not really: simply try a new clone, and add what was in the old clone, to see if the error persists. – VonC Sep 01 '14 at 07:41
  • I get close error: Disk quota exceeded...but I have 41.3 GB in my HD – gabboshow Sep 01 '14 at 07:46

2 Answers2

2

The error seems to be linked to a quota issue.

Disk quota exceeded

...but I have 41.3 GB in my HD

This isn't linked to the free disk space. Check your quota with quota -s.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

I had the same issue and found that it was a file permissions issue. I had created the repository with a different user, and when I tried to any actions in git I was getting "Permission denied" of fetch and "unable to write new_index file".

Therefore, check the permissions of the root directory of the repository and make sure that the user has permissions to write to that directory