-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"fatal: Could not write a new index file" on Windows 10 #6036
Comments
How much disk space do you have and how much of is currently being used? Also, can you confirm if you get the same error using the git CLI? |
188 GB free out of 238 GB. Uh, oh. I'm using the GitHub Desktop because I don't know the CLI. That was kind of the whole point of a GUI product, I thought. Okay. I will install the CLI and try to figure out how to commit. Thanks for your quick response! |
@MarkerB a few other questions that may help us track down the cause of this:
|
Ah, hah! I am using Google Backup and Sync! I thought it would be read-only, but who knows? I'll disable it and try again. Thank you so much for this! |
@MarkerB just wanted to follow up -- did that get things working for you? |
Oh, yes. So far, so good. It was an intermittent problem, so I wanted to give it a little more of a test. Google Backup and Sync may have been locking the git index file when it saw the file updated, locking it long enough to upload it to the cloud. Maybe GitHub Desktop needed the file more freely accessible than that. Since Google Backup and Sync doesn't allow exclusion by folder, I had to put my git repo in a completely separate folder. Thank you so much! This had been a real problem for me in the last week; not sure why it came and went. Timing. |
No more
…On Wed, Oct 31, 2018, 10:01 PM Mark Bernard ***@***.*** wrote:
Oh, yes. So far, so good. It was an intermittent problem, so I wanted to
give it a little more of a test.
Google Backup and Sync may have been locking the git index file when it
saw the file updated, locking it long enough to upload it to the cloud.
Maybe GitHub Desktop needed the file more freely accessible than that.
Since Google Backup and Sync doesn't allow exclusion by folder, I had to
put my git repo in a completely separate folder.
Thank you so much! This had been a real problem for me in the last week;
not sure why it came and went. Timing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6036 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aj_QpkrrG_H59RCGuESNmZEpYM9JXu5uks5uqgGHgaJpZM4YCVCq>
.
|
@MarkerB I'm glad to hear things are working now. Since we've identified that as the root cause I'm going to close this issue out. |
Thanks man, you right Google Backup and Sync suck :/ |
It's probably not that simple. It seems more likely it's just an unfortunate interaction between GitHub and Google and creative methods they use to keep track of things. |
Yeah sorry, it's just that i have a very poor english and just to thank you for the solution. And i think it isn't normal that the problem already exist and they don't found a solution :/ |
I had the same issue but my solution was to close my VS Code program (I had the GitHub Repo loaded in the side panel). I guess it ties up the GitHub Desktop and causes this type of issue. |
@wangdanyang711 are you storing your repositories in a file syncing service? Are there any other Git applications running? Can you verify that the correct file permissions are set for the location where you are storing your repositories? |
The folder permissions would be visible in the |
Description
I get this error when attempting to commit. I can start from scratch with a new clone of an entire repo, but it eventually comes back again.
It's happened with various repositories, and on my previous Windows 7 Ultimate installation.
I've tried to delete the .git/index file, but then it shows that all the files in my repo are brand new. That's not going to work.
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 the github.com repo down to my machine, and re-implementing all the changes I had made since my last successful commit and push.
I additionally find I often need to uninstall and reinstall GitHub Desktop to get it to commit without error.
Version
Additional Information
Logs
2018-10-30T15:58:29.041Z - info: [ui] Background fetch for 3 repositories took 2.028sec
2018-10-30T16:02:09.254Z - info: [ui] Executing fetch: git -c credential.helper= fetch --progress --prune origin (took 3.395s)
2018-10-30T16:13:30.883Z - info: [ui] Background fetch for 3 repositories took 1.837sec
2018-10-30T16:18:07.639Z - info: [ui] [AppStore] loading 3 repositories from store
2018-10-30T16:18:07.641Z - info: [ui] [AppStore] found account: MarkerB (Mark Bernard)
2018-10-30T16:18:08.096Z - info: [ui] launching: 1.4.3 (Windows 10.0.16299)
2018-10-30T16:18:08.097Z - info: [ui] execPath: 'C:\Users\mark\AppData\Local\GitHubDesktop\app-1.4.3\GitHubDesktop.exe'
2018-10-30T16:18:09.081Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.137s)
2018-10-30T16:18:16.401Z - error: [ui]
git reset -- .
exited with an unexpected code: 128.Unstaged changes after reset:
M xxxxxxx_archive.php
M functions/xxx/xxxmisc.php
fatal: Could not write new index file.
The text was updated successfully, but these errors were encountered: