question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fatal: Could not write new index file.

See original GitHub issue

Description

Attempt to commit and get error msg “fatal: Could not write new index file.”

log file showed 2018-06-22T20:28:20.171Z - info: [ui] [AppStore] loading 1 repositories from store 2018-06-22T20:28:20.171Z - info: [ui] [AppStore] found account: johngrabner (johngrabner) 2018-06-22T20:28:20.520Z - info: [ui] launching: 1.2.3 (Windows 10.0.16299) 2018-06-22T20:28:20.520Z - info: [ui] execPath: ‘C:\Users\john_\AppData\Local\GitHubDesktop\app-1.2.3\GitHubDesktop.exe’ 2018-06-22T20:28:39.680Z - error: [ui] git reset -- . exited with an unexpected code: 128. Unstaged changes after reset: M Coaster SW/Coaster_LED/Coaster_Application_Messages.c M Coaster SW/Coaster_LED/message_and_state_definitions.c M Coaster SW/Coaster_LED/message_and_state_definitions.h M Coaster SW/Coaster_LED/nbproject/Makefile-genesis.properties M Coaster SW/Coaster_LED/nbproject/private/private.xml

fatal: Could not write new index file.

Version

1.2.3 Place the version of your operating system below this comment. The operating system you are running on may also help with reproducing the issue. If you are on macOS, launch ‘About This Mac’ and write down the OS version listed. If you are on Windows, open ‘Command Prompt’ and attach the output of this command: ‘cmd /c ver’ –>

  • Operating system: windows 10

Steps to Reproduce

click commit on project https://github.com/johngrabner/Coaster

Expected Behavior

Actual Behavior

Additional Information

Logs

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
MarkerBcommented, Oct 30, 2018

I get this error continually in GitHub Desktop for Windows 1.4.3 x64 under Windows 10 Pro. If I delete the .git/index file, then run the program again, it shows that all the files in my repo are new. That’s not good.

If I restore an older version of the .git/index file, I still get the same error on committing. My workaround each time has been to start over from scratch, cloning my github.com repo down to my machine, and re-implementing all the changes I had made since my last commit and push. I often need to uninstall and reinstall GitHub Desktop to get it to commit without error.

I hadn’t noticed this thread was closed, so I opened a new issue at https://github.com/desktop/desktop/issues/6036

2reactions
stevewardcommented, Jun 25, 2018

Closing this out since @johngrabner mentioned via email he resolved this by deleting the index.lock file in the repository.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git 'fatal: Unable to write new index file' - Stack Overflow
The error message fatal: Unable to write new index file means that we could not write the new content to the git index...
Read more >
Git fatal: unable to write new_index file - Server Fault
I have found that SSHing to the server as the www-data user, cd'ing to the .git folder within the project, and then renaming...
Read more >
Git commit fails with "unable to write new index file"
fatal : Unable to write new index file”. I can commit the same changes to the same repo with Visual Studio 2017 and...
Read more >
Repository has been updated, but unable to write new_index file
fatal: Repository has been updated, but unable to write new_index file. Check that disk is not full or quota is not exceeded, and...
Read more >
git fatal: could not write new index file.
git problem:fatal: Unable to write new index file (3) Do you have write access to .git (=can you create new files there and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found