Recover unreferenced commits from remote git repository
问题 Here's the situation : some commits have been done in a remote repository. Unfortunately, someone did push -f such that no remote branch references these commits anymore. To make matters worse, I don't have those commits in my local clone. My goal is basically to recover those commits. These are some of the things I tried : git checkout -b recovery <commit_id> : fatal: reference is not a tree git push origin <commit_id>:recovery error: refs/heads/recovery does not point to a valid object!