Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
推送到远程存储库(例如Google源存储库)时缺少git标记_Git_Tags_Google Source Repositories - Fatal编程技术网

推送到远程存储库(例如Google源存储库)时缺少git标记

推送到远程存储库(例如Google源存储库)时缺少git标记,git,tags,google-source-repositories,Git,Tags,Google Source Repositories,我刚刚建立了一个本地git repo,并将其复制到一个基于Google“云源存储库”的远程repo。除了没有复制标记外,这基本上工作正常。我有一些旧的谷歌回购协议,以同样的方式构建(据我记忆所及),它们确实有标签。所以我不确定到底发生了什么 这一过程是: 创建本地git repo(在ubuntu 18.04机器上的git 2.17.1) 添加一些文件并提交它们 沿着git tag-a V1.0.0-m“初始工作版本”的行添加一些标记 更新并添加更多文件(这是我为团队编写的培训指南),添加更多标

我刚刚建立了一个本地git repo,并将其复制到一个基于Google“云源存储库”的远程repo。除了没有复制标记外,这基本上工作正常。我有一些旧的谷歌回购协议,以同样的方式构建(据我记忆所及),它们确实有标签。所以我不确定到底发生了什么

这一过程是:

  • 创建本地git repo(在ubuntu 18.04机器上的git 2.17.1)
  • 添加一些文件并提交它们
  • 沿着git tag-a V1.0.0-m“初始工作版本”的行添加一些标记
  • 更新并添加更多文件(这是我为团队编写的培训指南),添加更多标签,以及
  • 然后建立一个谷歌回购,通过谷歌SDK连接到它 机制,和git推送——所有的google
除了远程回购协议中没有标签外,所有这些似乎都很有效。git-tags命令的输出如下所示,我可以在gitkgui中很好地看到这些标记。因此,问题不在于本地回购协议。这些标签还没有进入谷歌的回购协议

以前有没有人见过这个问题,或者可以建议我接下来看什么? 推送输出如下:无错误

git push --all google
Counting objects: 25, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (25/25), 5.03 KiB | 2.51 MiB/s, done.
Total 25 (delta 7), reused 0 (delta 0)
remote: Resolving deltas: 100% (7/7)
To https://source.developers.google.com/p/<REDACTED>/r/git_test
 * [new branch]      master -> master
git推送——全是谷歌
计数对象:25,完成。
增量压缩最多使用2个线程。
压缩对象:100%(20/20),完成。
写入对象:100%(25/25),5.03 KiB | 2.51 MiB/s,完成。
总计25(增量7),重复使用0(增量0)
远程:解析增量:100%(7/7)
到https://source.developers.google.com/p//r/git_test
*[新分支]主控->主控

感谢John指出了预期行为!From“默认情况下,gitpush命令不会将标记传输到远程服务器。”


所以你需要一个明确的:
git-push--tags google
在我的例子中,或者
git-push--tags origin
在典型的例子中。

你有没有尝试过
git-push--tags
?刚刚尝试过:效果很好!有点惊讶的是——所有实际上并不意味着所有,我很确定我以前不必显式地推送标签,但我想事情会改变。
git push --all google
Counting objects: 25, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (20/20), done.
Writing objects: 100% (25/25), 5.03 KiB | 2.51 MiB/s, done.
Total 25 (delta 7), reused 0 (delta 0)
remote: Resolving deltas: 100% (7/7)
To https://source.developers.google.com/p/<REDACTED>/r/git_test
 * [new branch]      master -> master