git tag使用

时间:2023-03-09 15:46:42
git tag使用

#git tag command

git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
               <tagname> [<commit> | <object>]

git tag -a v1.0.1 -m "version 1.0.1" 4b0706d4c

#create local tags

git tag -a v1.0 -m "new tag"

#check local tags

git tag

#push local tags to remote

git push --tags

#delete local tag

git tag -d v1.0

#delete remote tag

git push origin :refs/tags/v1.0

#pull remote tags

git pull origin --tags

git fetch --tags