How to Mixed Reset in Git

A mixed reset in Git moves the HEAD pointer and resets the staging area while preserving changes in your working directory. As the creator of CoreUI with over 25 years of software development experience, I use mixed resets frequently to reorganize commits and unstage files while keeping my changes intact. This is the default behavior of git reset and provides a safe way to modify commit history.

Use git reset --mixed (or simply git reset) to reset the staging area while keeping working directory changes.

# Mixed reset to previous commit (default behavior)
git reset HEAD~1

# Explicitly specify mixed reset
git reset --mixed HEAD~1

# Mixed reset to specific commit
git reset --mixed abc123f

# Mixed reset multiple commits
git reset HEAD~3

# Reset to origin branch state
git reset origin/main

# Check what happened
git status
git log --oneline

The mixed reset moves your current branch pointer to the specified commit and resets the staging area to match that commit, but leaves your working directory unchanged. This means your file modifications remain but become “unstaged” changes. It’s perfect for when you want to recommit changes differently, combine multiple commits, or split a large commit into smaller ones. The changes stay in your working directory ready to be staged and committed again.

Best Practice Note:

In CoreUI development, we use mixed resets to clean up commit history before merging feature branches. This allows us to reorganize related changes into logical commits while preserving all the work done. It’s much safer than hard reset since you never lose your actual code changes.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author