git problem : fatal: Unable to write new index file

后端 未结 14 614
抹茶落季
抹茶落季 2020-12-29 02:52

I have an existing project that has been managed under git. I recently had to do a ground-up rebuild of the computer (OS X Snow Leopard), and returning to the project, git c

相关标签:
14条回答
  • 2020-12-29 03:30

    This is old, but the cause for me was Dropbox. My local repository was stored in my Dropbox folder, and I had to pause Dropbox syncing before I could complete the command.

    0 讨论(0)
  • 2020-12-29 03:31

    To add: surprisingly, some git plug-ins blocks index file. My Eclipse Kepler has default plug-in, that occasionally updates some own info from git repo, blocking index file during that operation.

    0 讨论(0)
  • 2020-12-29 03:35

    I had same problem. I still dunno the cause, but my workaround is delete index.lock sudo rm -f index.lock, and then i gave write permission to index sudo chmod 777 index. After this I am able to stage and commit. The problem is I have to do this almost all the times I have something to stage.

    0 讨论(0)
  • 2020-12-29 03:35

    I had the same error because Google Drive's Backup and Sync client for Windows had not released a lock on two files within this repository. A work around was, after the sync client had finished its work: Process Explorer -> Find -> Find handle or DLL -> Close Handle.

    0 讨论(0)
  • 2020-12-29 03:39

    I've had a simular problem with SFTP Network Drive (free). The solution is: fill chekcbox "Delete existing target before moving" found in the Profile Settings of SFTP Network Drive.

    0 讨论(0)
  • 2020-12-29 03:40

    I was using Parallels running Ubuntu on my Mac. I could git init, but not git add. I believe the issue is that git add requires an atomic synch to the underlying git database. And since the filesystem I was using was actually on my Mac and Parallels was exporting from my Mac via a network share. I believe this means that git couldn't do what it wanted. Moving the files locally fixed the problem (In my case this was easy since I was using DropBox on my Mac, so I just installed DropBox on my Ubuntu running Parallels)

    0 讨论(0)
提交回复
热议问题