0

I was just prompted to update oh my zsh but when I tried to do so I got the following error:

Updating Oh My Zsh
error: cannot pull with rebase: You have unstaged changes.
error: object file .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb is empty
error: object file .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb is empty
fatal: loose object 40fafe0f59371d1a9d83b83c614acfd1d740aabb (stored in .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb) is corrupt

Anyone have an idea what to do? Haven't been able to find anything

DavidM
  • 173
  • 1
  • 9
  • It seems you have made a change to something in the oh-my-zsh folder and have not committed those changes. – evolutionxbox Dec 17 '19 at 08:54
  • @evolutionxbox I went into the zsh directory but there were no changes. Tried stashing anyway but didn't help – DavidM Dec 17 '19 at 10:21
  • The `~/.oh-my-zsh` directory? – evolutionxbox Dec 17 '19 at 10:42
  • @evolutionxbox that's the one – DavidM Dec 17 '19 at 15:28
  • Hmmm. If you run git status in that directory what does it output? – evolutionxbox Dec 17 '19 at 15:29
  • @evolutionxbox sorry was off on christmas break. When I run git status I get: ```error: object file .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb is empty error: object file .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb is empty fatal: loose object 40fafe0f59371d1a9d83b83c614acfd1d740aabb (stored in .git/objects/40/fafe0f59371d1a9d83b83c614acfd1d740aabb) is corrupt``` – DavidM Dec 31 '19 at 10:08
  • Ok. Other than following instructions about fixing the internals of the git repo (https://stackoverflow.com/questions/4254389/git-corrupt-loose-object) I would suggest renaming your “oh-my-zsh” folder to something else and then reinstalling it. – evolutionxbox Dec 31 '19 at 12:36

1 Answers1

0

maybe someone needs

  1. Copy a folder with your project to another folder
  2. Delete the origine folder with project
  3. Download latest version of your project from your github
  4. Replace all file in project folder with files from copy folder (important!!! All files except folder .git)
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 23 '22 at 20:44
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/33476302) – コリン Dec 25 '22 at 14:45