GIt 系統(tǒng)版本號管理
=========
命令
- 系統(tǒng)版本號管理
- git tag [tag_name] + [commit_id] 創(chuàng)建版本
- git show [tag_name] 查看版本
- git tag -d [tag_name] 刪除版本
系統(tǒng)版本號管理
任何軟件系統(tǒng),應(yīng)用程序在發(fā)布時都應(yīng)該給一個版本號,來管理每次發(fā)布的內(nèi)容,便于今后的管理。
1.1.4
NNN.abc.xxx
- NNN:大版本號
- abc:每次做出的小更新時,發(fā)布的版本號
- xxx:每次bug修正時發(fā)布的版本號
# 為當(dāng)前狀態(tài)打版本號 并查看
git tag v1.0.0
git tag
# 修改 index.html 文件 并提交到本地庫
nano index.html
git add .
git commit -m "fixed bug1"
# 再次打上版本
git tag v1.0.1
git tag
# 修改 index.html 文件 并提交到本地庫
nano index.html
git add .
git commit -m "fixed bug2"
# 再次打上版本
git tag v1.0.2
git tag
#新功能的增加
nano index.html
git add .
git commit -m "addend feature"
# 再次打上版本
git tag v1.1.0
git tag
# 查看版本
git show v1.0.1