A developer made two local commits on a feature branch that have not been pushed. They want the branch pointer moved back and the index updated accordingly. Which official Git tool matches that local rewrite?
Select an answer to reveal the explanation.
Short Explanation
reset is the local “move my branch sticker” tool—soft, mixed, or hard depending how much workspace you rewrite. It is for commits you have not shared. Undoing published history for everyone else is revert’s job.
Full Explanation
git reset repositions the current branch among commits and can rewrite the index and worktree; it is the official operation for dropping or unstaging local, unshared work. Using reset to rewrite a shared main that others fetched is the team-breaking anti-pattern contrasted with revert.