当标签在推入时向库提交时,Git提交未显示在存储库上 [英] Git commit doesn't show on repository when a tag is moved towards it on push

查看:67
本文介绍了当标签在推入时向库提交时,Git提交未显示在存储库上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近推送了一个提交,并通过该推送将先前的标签移到了提交上.

I recently pushed a commit and moved a previous tag onto it with the push.

git add -A .
git commit -m "made changes and moving previous tag to this commit"
git tag -a {previous-tag} -f
git push --tags -f

使用git log时,它显示提交,但是在我的git repo页面上,它不显示提交.我该如何解决?

When using git log it shows the commit, but at my git repo page, it doesn't show the commit. How can I fix this?

我的Github页面上显示的最新提交是标签最初所在的提交.

The most recent commit shown on my Github page is the commit that the tag was originally on.

同样,Composer提取正确的提交(将较旧的标记推送到的新提交).我不是在拉开发大师.

Edit 2: Also, Composer pulls in the correct commit (the newer one that the older tag was pushed to). I'm not pulling dev-master.

更新:

我不确定问题出在什么地方,但是我推送了一个测试提交(没有移动标签),然后突然出现了前两个未显示的提交(问题提交的时间戳记是在几小时前).

I'm not sure what the problem was but I pushed a test commit (without moving tag) and suddenly the previous two commits that did not show are showing up now (timestamp of the problem commit was hours ago).

推荐答案

除非您使用的是git push --follow-tags(git 1.8.3+ ),您只推送了标签,未推送分支HEAD.

Unless you are using git push --follow-tags (git 1.8.3+), you have pushed only the tag, not the branch HEAD.

拉动将拉动该标记,并引用该提交.
但是,直到您推送分支HEAD(通过推送测试提交完成),您才能在远程存储库上看到带标记的提交.

A pull will pull that tag, and reference that commit.
But until you push the branch HEAD (which you did by pushing a test commit), you won't see that tagged commit on the remote repo.

这篇关于当标签在推入时向库提交时,Git提交未显示在存储库上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆