github發布版本后再pacakgist能拉取到需要發布版本
本地
mac@macdeMacBook-Pro:/www/tool$ git add . mac@macdeMacBook-Pro:/www/tool$ git commit -m 'test' [master dc1bf10] test 6 files changed, 29 insertions(+), 8 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 composer.json mode change 100644 => 100755 index.php rename src/{Db => }/DB.php (89%) mode change 100644 => 100755 mode change 100644 => 100755 src/Redis.php mode change 100644 => 100755 test.php mac@macdeMacBook-Pro:/www/tool$ git push origin master Counting objects: 7, done. Delta compression using up to 8 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 959 bytes | 959.00 KiB/s, done. Total 7 (delta 1), reused 0 (delta 0) remote: Resolving deltas: 100% (1/1), completed with 1 local object. To github.com:brady-wang/tool.git 16cd720..dc1bf10 master -> master mac@macdeMacBook-Pro:/www/tool$ git tag -a v1.5 -m '發布我的第五個版本' mac@macdeMacBook-Pro:/www/tool$ git push origin v1.5 Counting objects: 1, done. Writing objects: 100% (1/1), 186 bytes | 186.00 KiB/s, done. Total 1 (delta 0), reused 0 (delta 0) To github.com:brady-wang/tool.git * [new tag] v1.5 -> v1.5 mac@macdeMacBook-Pro:/www/tool$
進入github項目里面
reases 點擊
點擊tags
點擊要發布的對應的tag最右邊 選擇 create rease
點擊發布
# 創建附注標簽
$ git tag -a v0.1.2 -m “0.1.2版本”
列出標簽
$ git tag # 在控制台打印出當前倉庫的所有標簽
$ git tag -l ‘v0.1.*’ # 搜索符合模式的標簽
git push並不會把tag標簽傳送到遠端服務器上,只有通過顯式命令才能分享標簽到遠端倉庫。
1.push單個tag,命令格式為:git push origin [tagname]
例如:
git push origin v1.0 #將本地v1.0的tag推送到遠端服務器
2.push所有tag,命令格式為:git push [origin] --tags
例如:
git push --tags
或
git push origin --tags