How to switch between the tags in Git
Andrew Henderson
I am new to git. And I am facing problems while moving between the tags. I want to switch between the tags. Like if I have two versions. For example. version 1.0 version 2.0 so I want to move from version 2.0 to version 1.0 in Git.
02 Answers
In git, a tag is given a name, which in git terminology is its reference. A tag in reality is more like an alias to a specific commit id (which is also a reference).
See
So to switch between tags you would use the same technique that you would use to switch between other references such as branches or commits... git checkout <tagname>.
You are probably looking for:
git checkout taggit checkout can be used to checkout any commit and after that it can be used with a branch name to go back to a named branch.