Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
216 views
in Technique[技术] by (71.8m points)

git - github not showing last 9 commits

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...