Is there a way to clone a remote git repo while keeping any unreachable commits that may be in that repo?
The scenario is this: I need to recover a branch that was deleted from a bare git repo on a server that I maintain. I have the hash of the last commit to this branch, but The regular git commands do not seem to be able to function on bare repos, so as far as I am aware there is not any way I can recover it directly on the server.
I also do not have access to any non-bare repos that contain this commit. If I did, I could recover it easily by checking out the commit hash and then creating a branch from it. This is why I would like to be able to clone this repo while keeping any unreachable commits in it, so I can do exactly that.