Skip to content

Instantly share code, notes, and snippets.

@strika
Created August 27, 2015 09:32
Show Gist options
  • Save strika/9349a16cefdc8750d99a to your computer and use it in GitHub Desktop.
Save strika/9349a16cefdc8750d99a to your computer and use it in GitHub Desktop.
Save commit from GitHub reflog
#!/bin/bash
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: token API_TOKEN" -X POST -d '{"ref":"refs/heads/D-commit", "sha":"LOST_SHA"}' https://api.github.com/repos/ACCOUNT/PROJECT/git/refs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment