Git temporarily checkout a histo
2021-06-08 本文已影响0人
JaedenKil
Scenario:
Say I'm on a branch dev
, there are multiple commits.
I need to temporarily go back to a history commit.
- Rollback to a history commit:
git checkout commitId // ID for the history commit
- Go back to the original status:
git checkout -
OR
git checkount dev
Just Make sure the branch is "clean" before the executions via git status
.