# Reset the index to the desired commit
git reset --hard <commit>
# Move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
# Commit the changes
git commit -m "Revert to <commit>"
Author Profile
![PREM KUMAR](https://pkworlz.com/wp-content/uploads/2021/12/WhatsApp-Image-2021-06-24-at-8.47.49-PM-min-150x150.jpeg)
- Hey Its..! Tech Lover , Ionic, Angular, Typescript, Dotnet Core, Node, Like Opencv, AI, ML, Robotics, Iot, Love Music, Cooking, Girls, Innovation