Git: how to revert back the last commit?

how to revert to last commit magento 2
We have all been there where we had to revert back our last commit from GIT, so below is the simple command to revert back your last commit -:

git reset --soft HEAD~1

The above command will only revert back your last commit but it will keep the file(s) and folder(s) intact so that you can either replace them with previous version or make further changes to the file(s) or folder(s)

Hope this article helped you in some way. Please leave us your comment and let us know what do you think? Thanks.

Discover more from WHO WILL CARE eCommerce

Subscribe now to keep reading and get access to the full archive.

Continue reading