【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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章