My development repository at some point lost an object.
$ git fsck
fatal: failed to read object 2dddc84156fa30e4614a7ea5a1895885011b8db8: Invalid argument
$ git cat-file -t 2dddc84156fa30e4614a7ea5a1895885011b8db8
error: unable to find 2dddc84156fa30e4614a7ea5a1895885011b8db8
fatal: git cat-file 2dddc84156fa30e4614a7ea5a1895885011b8db8: bad file
A freshly cloned repository has that object.
$ git cat-file -t 2dddc84156fa30e4614a7ea5a1895885011b8db8
tree
I would like to keep my development repository, it has unpushed branches and stashes.
How can I patch that object into my broken repository?
What you can try, is to get the file
.git/objects/2d/ddc84156fa30e4614a7ea5a1895885011b8db8from the freshly cloned repository and copy it to your development repo …