I am surprised, I couldn't find the answer to this on SO.
Can we recover/restore deleted commits in git?
For example, this is what I did:
# Remove the last commit from my local branch
$ git reset --hard HEAD~1
# Force push the delete
$ git push --force
Now, is there a way to get back the commit which was deleted? Does git record(log) the delete internally?