Topic: Git Basics

Undo your last commit – Git

Preview

To undo your last commit, enter the following command in your terminal:

git reset --soft HEAD~1

To view this and the other 250+ tutorials on Simple Dev, sign up for a 10-day free trial.