I am new to Git and have been using it for a few weeks now on my Ubuntu Virtual Box Machine. Usually, I would run my git commands in the Visual Studio Code terminal. I have encountered the following errors a few times already whenever I start a new session on my virtual machine.
error: object file ... is empty
fatal: loose object ... is empty
The solution provided by cubic lettuce here managed to solve the issue. Out of curiosity, why does this happen? Is there something that I should avoid doing to prevent my local git repo from being corrupted?
Thanks! :)