How to find out which tag has been checked before

In a tag list, for example

V001
V002
V003
V004
V005

I pulled out a new tag, say v006on git fetch --tagsand git checkout v006.

By mistake, I did not notice which version was checked ( git describe --tags) before this new check. It seems to be a mistake, and I should go back to the old tags. How do I know which tag was used?

+3
source share
1 answer

HEADEach successful check is recorded in the reflector along with the text "transition from (point A) to (point B)", for example:

$ git reflog
676699a HEAD@{0}: checkout: moving from
        695326c489285ed5678ac04d58289bcb24019bb9 to tag2
695326c HEAD@{1}: checkout: moving from master to tag1

master, git checkout tag, git checkout tag2. (: , . git, "", / , .)

( , ) SHA-1, , , (, --detach ) " HEAD", HEAD SHA-1. , 695326c489285ed5678ac04d58289bcb24019bb9 SHA-1 tag1.


: : ", , " ( ) git-revert. git checkout ( SHA-1) (.. ). git revert , , .

git revert, ( , git checkout master git checkout develop ), , - , " " ( , , , git push, ). "", , , .

+1