There are certain scenarios where you need to unstage local Git commit changes. As everything with Git, there are multiple angles from which you can approach almost anything.
Unstage commit but keep changes
git reset --soft HEAD
Unstage commit and get rid of any changes
git reset --hard HEAD
HEAD means that you will unstage your last commit. If that’s not the case, replace
HEAD with the preferred commit ID.
Related post: Unstaging files in Git.