How to undo last commit but keep changes

In this article let’s discuss about How to undo last commit but keep changes. Let’s go through the following methods without any delay.

Method 1:

git reset HEAD^ --soft

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

Method 2 :

git reset @~

Hope the above solution works.

Realted Posts : Github set branch upstream