git - How to reset to the top of a branch -
suppose i'm working on master , i've commit 5 changesets:
v1 -- v2 -- v3 -- v4 -- v5 now 'git reset --hard v3' go particular point. @ stage, 'git log' show 1st 3 commits , hash v4 , v5 not displayed. how can v5 easily?
(i did find way poking .git directory it's tedious , i'd avoid dealing .git directory directly).
the git reflog should contain entry former head. can git checkout state (head@{n}) , work it.
Comments
Post a Comment