i use git on ubuntu headless server on virtualbox on my laptop. when i shut down the pc, i don't bother shutting down the virtualbox, i just shutdown the pc. it never was a problem. it was fine since yesterday, when the power is gone. laptop had 2 hours remaining so i used it to the last minute, then i closed my ssh session, then closed the laptop. it properly closed, though power was out. morning, when i opened the laptop again, git was corrupted. why did this happen?

  • there can be any number of reasons why this happened.. if your virtualbox was processing data when the power was removed, all sorts of unexpected corruption can occur. I would recommend using better practices rather than wondering why bad practices have failed you every 1/5 times. – SgtPooki Jul 4 '14 at 7:05
  • I eventually have to shutdown the pc anyway why should i explicitly state that. I just make sure i saved all my files before shutting down the pc, so why would that be bad practice or cause of a corruption, huh? – mattheew Jul 5 '14 at 23:33
  • 1
    My git repository in the VM often gets corrupted even with proper shutdown of the VM. Has anybody opened an issue with virtualbox? e.g. liucs.net/cs102f13/non-virtual.html – Ido Tamir Sep 12 '14 at 10:02
  • I'm experiencing the very same problem, when I shut down the VM , my local repository gets corrupted. The last commit gets trunkated to a zero length object. As if the object file is being held open by git. – Martin Spamer Sep 12 '16 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.