git - --follow-tags 似乎不适用于 `git push`
问题描述
这是我的复制品:
$ 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
,但它不应该v1.0.0
在将提交推送到上游时推送我的标签吗?
提前致谢!
解决方案
推送远程缺少的 refs/tags 中的注释标签,但指向可从
git tag v1.0.0
创建了一个轻量级的非注释标签。删除它并创建一个带注释的标签:
$ git tag -d v1.0.0
$ git tag -a v1.0.0
推荐阅读
- graph - 使用树函数在 gremlin 中返回边缘属性
- python - 将数据分成 4 个季节?
- android - 在 Google Play 中拆分后是否可以重新使用通用 apk?
- lora - LoRaWAN:即使我的产品没有通过LoRa联盟认证,是否允许写我的产品兼容LoRaWAN?
- javascript - AWS S3 泄漏连接
- pandoc - 如何在 Pandoc 的投影仪列中设置垂直对齐?
- twitter-bootstrap - 为什么在 Bootstrap 5 中导航和部分重叠
- r - 如何从具有相同列的列表中删除数据框?
- c++ - boost::interprocess 消息队列 timed_receive() 内部过程
- java - 单击按钮时框架未关闭