In this article let’s discuss about Git reset soft head. Let’s go through the following methods without any delay.
git reset --soft HEAD^ //resets head by 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 reset --soft HEAD^ #The command to undo a commit and reset to the commit before HEAD and keeping the changes is:
Hope the above solution works.
Realted Posts : Main vs master in git