How to recover a git commit that is reset or discarded

Calm down! You can get it back!

Lynn G. Kwong

--

We can make all kinds of mistakes when we write code. It is normal to make mistakes, but we should know how to solve the problem efficiently. In this article, I will show you an efficient way to recover a git commit that is reset or discarded accidentally.

Photo by Martin Sanchez on Unsplash.

--

--

Lynn G. Kwong

I’m a Software Developer (https://medium.com/@lynn-kwong) keen on sharing thoughts, tutorials, and solutions for the best practice of software development.