> For the complete documentation index, see [llms.txt](https://huataihuang.gitbook.io/cloud-atlas-draft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://huataihuang.gitbook.io/cloud-atlas-draft/devops/git/git_checkout_specified_tag.md).

# git checkout指定tag

当需要checkout一个仓库的特定tag时候，不是使用 `git checkout -b` 指令，而是使用 `git fetch`

```
git fetch && git fetch --tags
```

由于tag通常不会下载，所以需要指定tag

```
git checkout v1.0.1
```

## 参考

* [Git clone a repository and checkout a specified tag](https://coderwall.com/p/k2fisg/git-clone-a-repository-and-checkout-a-specified-tag)
