How to revert to last git commit

In this article let’s discuss about How to revert to last git commit. Let’s go through the following methods without any delay.

Method 1:

git reset --soft HEAD~1

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

git checkout . #This will get rid of all uncommited change

Hope the above solution works.

Realted Posts : Ngx-material-file-input