How to recover a git commit that is reset or discarded

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 in Unsplash.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lynn Kwong

Lynn Kwong

439 Followers

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