首先确保电脑上已安装了git软件
1、打标签
git tag -a 0.1.3 -m “Release version 0.1.3″
详解:
git tag 是命令
-a 0.1.3是增加 名为0.1.3的标签
-m 后面跟着的是标签的注释
2、提交代码
git add .
git commit -m “fixed some bugs”
git tag -a 0.1.3 -m “Release version 0.1.3″
3、分享提交标签到远程服务器上
git push origin master
git push origin --tags
详解:–tags参数表示提交所有tag至服务器端,普通的git push origin master操作不会推送标签到服务器端。
4、切换到已有Tag
git tag --list // 查看已有tag列表
git checkout [tag/branch/commit] // 切换到指定tag/branch/commit都是此命令
5、删除标签的命令
git tag -d 0.1.3
6、删除远端服务器的标签
git push origin :refs/tags/0.1.3
好用记得分享哦!~~~~