Skip to content

Instantly share code, notes, and snippets.

@mcandre
Last active April 21, 2020 22:03
Show Gist options
  • Save mcandre/94d3f7c50d3e245e31e6 to your computer and use it in GitHub Desktop.
Save mcandre/94d3f7c50d3e245e31e6 to your computer and use it in GitHub Desktop.
"Checkout a tag" in Git

How to "checkout a tag" in Git:

Purists will whine that you can't technically checkout a tag in Git; instead, you checkout a branch at a start point, which may be a tag.

Assuming the desired tag is v1.0, you can tell Git to create a new branch, also named v1.0, at the point in Git history where the tag is v1.0:

project (master)$ git checkout tags/v1.0 -b v1.0
project (v1.0)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment