Access inaccessible git commits

1 min read

Note: This is mostly a personal note, but maybe helpful for others

I accidentally removed a local branch using git branch -D local-branch, but I forgot to push the last commit.

I found this on the interwebs.

git log -reflog

which gets all the logs and I was able to cherry-pick from there on.