🔄
Verifiedgit0 installs

Undo Last Commit

Undo last commit but keep changes staged

Command

git reset --soft HEAD~1

Installation

Via StackShack CLI

npx stackshack install git-undo-commit

Manual Installation

Copy and run the command in your terminal:

git reset --soft HEAD~1

Prerequisites

git

Tags

#git#undo#reset

Quick Actions

Stats

Installs0
Categorygit
Statuspublished

Need Help?

Check our documentation or reach out to the community.

Get Support

More git Commands