PortMan PortMan - 1 month ago 6x
Git Question

How to make my workspace match another commit like "hg revert -r [commit] --all"

Without changing which commit I have checked out, how can I set my entire working directory to a different commit?

In mercurial, I would do this with

hg revert -r [commit] --all


Use git checkout with a path; e.g. '.' for the complete actual working directory:

git checkout <commit-id> -- .