Search code examples
gitgithubcommand-line-interfacesha

How to recover deleted commits from https://api.github.com/repos/<user>/<rep>/events?


I followed the instructions from https://objectpartners.com/2014/02/11/recovering-a-commit-from-githubs-reflog/ and git can I view the reflog of a remote?, but I'm stuck on the last step of these instructions. I get the error "No argument for the "InFile" parameter". Removing this parameter or adding an argument brings up the errors "Cannot bind the "Headers" parameter. Cannot convert value of string type to IDictionary type". I also tried "github.com/<user>/<repo>/commits/<orphan-commit-id>" and I got a 404 error. How do I move forward on this issue?


Solution

  • The query error was due to the fact that I was using powerShell. By switching to git bash, I stopped getting these errors, but encountered another one, which was solved by adding -u : to the request.