git switch --detach v1.0.0

Category: Git - Core

git switch --detach v1.0.0

Check out a tag with a detached HEAD

Checks out the given commit or tag without creating a branch, leaving HEAD detached. Any commits made here belong to no branch and can be lost, so create a branch first if you plan to work. Use it to inspect or build an old release.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.