Git

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.

  1. Rollback to a history commit:
git checkout commitId // ID for the history commit
  1. 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.

上一篇下一篇

猜你喜欢

热点阅读