git reset --soft: undo a commit without losing your changes

calendar_today timer Reading time ~1 minute

Did I commit too early? Don’t delete anything. If you haven’t pushed yet, run git reset with the --soft flag.

Your commit will disappear, but every change stays staged and ready for you to use. You won’t lose a thing — you just uncommitted.

Want the full walkthrough (including how to reuse the original message)? I covered it here: Undoing the last commit and keeping the changes for a next commit

Follow along for more git tips like this!

animated jess' signature

Related Articles