Neel Basu
Neel Basu

Reputation: 12904

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.

Upvotes: 0

Views: 4555

Answers (1)

Mark Longair
Mark Longair

Reputation: 468081

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.

Upvotes: 3

Related Questions