Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...