git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git bug report - disk errors on Windows after push

From
NSNeeraj Singh <nksingh85@gmail.com>
Date
Apr 21, 2022, 20:08 UTC
Message-ID
<51a685bf-3cd1-b573-535c-e18b2f987d66@gmail.com>
In-Reply-To
<CAMYm8FoA55JwXezckJxMPXGLh2+osCwsHHrg_MSjLMqG2emygQ@mail.gmail.com>
On 4/20/2022 7:29 PM, Attila Csosz wrote:
Show 16 quoted lines
> Please check this link also
> https://github.community/t/what-could-be-the-reason-my-git-repositories-keep-getting-corrupted-broken/184711
> 
> You can found many link on web on 'git corrupted repository'. In my
> opinion when a git repository is corrupted on Windows there is a good
> chance to HDD errors.
> 
> I suggest also run intensive test on Windows (run a bat file commiting
> and pushing to a bare directory type repository). Check your HDD
> healthy status after 10-20 run of 'git push'.
> 
> My git software is come form 'git-scm.com' and I'm using TortoiseGit.
> My git software is up to date.
> Last time my laptop HDD is crashed loosing sensitive datas. I will
> never push to a local repo I'm using online repo-s like github.
> 

Do you currently have a drive in the bad state? Is write-caching enabled for the drive (https://docs.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/turn-disk-write-caching-on-off)?

Git hammers the filesystem in a way that's not typically done for a USB drive (especially issuing some "FlushFileBuffers" calls). So it possibly exposes some inherent flakiness in your setup. For instance, your drives might be good, but something could be wrong with your USB cable or the power supply.

If you have a drive in the bad state, a "chkdsk /scan /X <drive letter>" might give some hints about what specifically is wrong with that filesystem.

I'd recommend preferring a cloud-based backup system for your Git repos (e.g. GitHub or GitLab). Also, for local backups, something solid-state like an SSD might be more reliable in the long run.

Thanks, Neeraj

Previous: Attila CsoszNext: Ævar Arnfjörð Bjarmason
Message 7 of 10 in “Git bug report - disk errors on Windows after push”
  1. Attila CsoszApr 18, 2022
  2. brian m. carlsonApr 18, 2022
  3. Attila CsoszApr 19, 2022
  4. brian m. carlsonApr 20, 2022
  5. Neeraj SinghApr 20, 2022
  6. Attila CsoszApr 21, 2022
  7. Neeraj SinghApr 21, 2022
  8. Ævar Arnfjörð BjarmasonApr 22, 2022
  9. Attila CsoszApr 22, 2022
  10. Junio C HamanoApr 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.