git reset: Move the branch pointer backwards in history, optionally changing staged/working-directory state. git reset moves your branch back to an earlier commit. How it treats your changes depends on the mode. --soft keeps the changes staged, --mixed, the default, keeps them in your files but unstaged, and --hard throws them away.
It is useful for undoing local commits before you share them, such as combining your last three commits into one: git reset --soft HEAD~3 followed by a new commit.
What should you keep in mind with git reset?
git reset --hard is one of the few Git commands that can really lose work, because uncommitted changes are deleted. Committed work can usually be recovered through git reflog, which records where your branch pointed before. Never reset commits that are already on a shared branch. Use git revert there, which undoes a change with a new commit instead of rewriting history.
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
'Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.'