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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -