【FAQ】如何检出git仓中最新的tag的代码(不知道tag名的情况)?

# Get new tags from remote
git fetch --tags

# Get latest tag name
LatestTag=$(git describe --tags `git rev-list --tags --max-count=1`)

# Checkout latest tag
git checkout $LatestTag

发布了64 篇原创文章 · 获赞 73 · 访问量 78万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章