git reset is one of the most direct tools in Git. Combined with the wrong target, it can erase commits you thought were permanent. Whether NDA stands for a branch name, a tag, or a shorthand in your team’s workflow, the effect is the same: Git moves the HEAD pointer. Files change. Commits vanish from view.
There are three main modes of git reset to understand before running it on a branch like NDA:
1. Soft – git reset --soft NDA moves HEAD to the target commit but keeps changes staged. You can recommit them as if nothing happened.
2. Mixed – git reset --mixed NDA resets HEAD and the index but leaves working directory changes untouched. This is the default mode when you just type git reset NDA.
3. Hard – git reset --hard NDA resets HEAD, the index, and the working directory. Everything reverts to the target commit. Uncommitted work is lost.