In this video, I explain how to revert commit before push code in GitHub server. I have explained all step to revert commit .
I have explain two way to revert commit
1) Undo the last commit : If you want to undo the last commit but keep the changes in your working directory
cmd:-- git reset HEAD~
2) Undo the last commit and discard changes
If you want to completely undo the last commit , including discard changes in your working directory
cmd: git reset --hard HEAD~`
![](https://s2.save4k.ru/pic/EtdSRmIuohw/maxresdefault.jpg)