DEV Community

Discussion on: How to undo the last commit

Collapse
 
arandilopez profile image
Arandi López • Edited

You can undo the latest commit with git reset --soft HEAD^ too. But if you already pushed your changes a revert could be a better option.