> test_file.txt $ git add . -6ren">
gpt4 book ai didi

git - --follow-tags 似乎不适用于 `git push`

转载 作者:行者123 更新时间:2023-12-03 21:19:06 28 4
gpt4 key购买 nike

这是我的重现:

$ mkdir git-test
$ cd git-test
$ git init
$ echo "hello world" >> test_file.txt
$ git add .
$ git commit -m "made a change"
$ git tag v1.0.0
$ git push -u --follow-tags origin master

现在如果我去我的上游仓库,它有提交但没有标签!

   --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 committish that are reachable from the
refs being pushed.


那是来自手册页。也许我误解了什么 --follow-tags确实如此,但它不应该 push 我的 v1.0.0在将提交推送到上游时标记?

提前致谢!

最佳答案

push annotated tags in refs/tags that are missing from the remote but are pointing at committish that are reachable from the


git tag v1.0.0创建了一个轻量级的、无注释的标签。删除它并创建一个带注释的标签:
$ git tag -d v1.0.0
$ git tag -a v1.0.0

关于git - --follow-tags 似乎不适用于 `git push`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56545643/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com