github没有显示最后9次提交 [英] github not showing last 9 commits
问题描述
push
几分钟,但它没有显示在 4月13日之后提交我可以做 git log
并查看4月13日以后提交的提交。 根据你的评论, '在名为 query / master
的分支上,这有点不寻常。是否正在创建该分支( refs / heads / query / master
)刻意?
无论如何,问题是如下。当你这样做时:
git push origin master
... git假设您的意思是:
git push origin master:master
...即尝试使主人
分支在 origin
>与我的本地 master
分支相同。但是,您不在名为 master
的本地分支上 - 您位于 query / master
。相反,你需要这样做:
git push origin query / master:master
如果你真的想要开始处理你的 master
分支而不是 query / master
,那么您可以执行以下操作:
#检查`git status`的输出是干净的,以使
#确保你不会丢失任何未提交的工作:
git status
#Switch到master分支:
git checkout master
#创建一个名为old-master的分支,记录master
#最初的位置,以防万一你仍想要:
git branch old-master
#将主分支重置为query / master所在的位置:
git reset --hard refs / heads / query / master
此后,当您在处理主分支
时, git push origin master
应该做你期望的。
github showing 13th April's commit as my last commit. I just did push
few minutes but its not showing up commits after April 13
I can do git log
and see commits that was made after April 13.
解决方案 According to your comments, you're on a branch called query/master
, which is slightly unusual. Was creating that branch (refs/heads/query/master
) deliberate?
In any case, the problem is as follows. When you do:
git push origin master
... git assumes that you mean:
git push origin master:master
... i.e. "try to make the master
branch in origin
the same as my local master
branch". However, you're not on the local branch called master
- you're on query/master
. Instead you need to do:
git push origin query/master:master
If what you really want is to start working on your master
branch instead of query/master
, then you can do the following:
# Check that the output of `git status` is clean, to make
# sure you don't lose any uncommitted work:
git status
# Switch to the master branch:
git checkout master
# Create a branch called old-master that records where master
# originally was, in case you still want that:
git branch old-master
# Reset your master branch to where query/master was:
git reset --hard refs/heads/query/master
Thereafter, when you're working on the master
branch, git push origin master
should do what you expect.
这篇关于github没有显示最后9次提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!