Given a git branch with some commits on it (C is the most recent commit):
A -> B -> C
How do I reset my workspace so that all the files are in the state they were at commit B, but HEAD is still at C?
I've looked at git-reset
, but none of the options seem to help. The man page suggests that all the different modes will move HEAD:
--soft Does not touch the index file or the working tree at all (but resets the head to <commit>, just like all modes do).
I've tried git reset HEAD~
but that moves HEAD.