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.