为什么使用git tag?
每次上线后,都需要打tag,理由: 方便以后可以找到一个稳定的包。
// 打标记,创建一个包
git tag -a vtagname -m "描述此次上线的内容" // 例如: git tag -a v20221116-web-master -m "20221116-web-master"
git push origin --tag // 提交到远程
git tag // 查看所有tag
/*
例如:
git tag
20221011-web-master
20221111-web-master
*/
git tag -d tagname
/*
git tag -d 20221011-web-master
*/