Reputation: 2210
After I have commited, I enter git checkout
by mistake, and the terminal shows Your branch is ahead of 'origin/quoted_price' by 1 commit.
, the quoted_price
is my branch name now. And I don't know how to recover..
And another question is what happened when I enter git checkout
Who could help me with it, please?
Upvotes: 0
Views: 83
Reputation: 90276
To get current commit : git rev-parse HEAD
gives the current SHA hash, git branch
gives the current branch.
To go to previous state: git checkout quoted_price
Upvotes: 1