Closed swyxio closed 11 months ago
Oh wow! I also recently wrote about the same issue with Obsidian on iCloud: https://architchandra.com/articles/a-side-effect-of-storing-a-git-repository-in-icloud-drive. 🙌🏽
Really like how you've tackled everything through the command line. I hope it would be okay if I try some of your learnings and incorporate them into my article later. Thanks!
I love your content, btw. You're an inspiration. :)
you're welcome! thanks for the nice note!
category: note slug: solve-git-bad-object-head
as a cheapo who uses Apple iCloud (the world's worst sync service) as a sync service for my Obsidian Second Brain, I have recently run into this issue a lot:
The top Stackoverflow answer is 10 yrs old and tells you to rm -rf .git, which ofc is not what you want to do it "right".
I've had to fix this a few times, and only recently worked it out with ChatGPT. Saving here for posterity:
when it is more fucked than normal
If you see a lot of "2"'s, thats icloud fucking you up. solve with
Then you can
git fetch origin
again.If you have
then run
misc notes
This may show you some bad objects:
So the fix is this:
(July 31 update) corrupt loose object
I also had this issue today:
i got a lot of recommendations with exotic options but ultimately the fix was this