--tags --follow-tags 的区别

时间:2024-01-03 08:58:02

--tags

    All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line.
--follow-tags

    Push all the refs that would be pushed without this option, and also push annotated tags in refs/tags that are missing from the remote but are pointing at commit-ish that are reachable from the refs being pushed. This can also be specified with configuration variable push.followTags. For more information, see push.followTags in git-config[1].

基本上两者看不出什么区别来,最保险的就是:
git push origin <tag_name>

-------------
https://github.com/git/git/commit/c2aba155da10b8bc9f867d2f0ac0e63cc8dae1a4