Github repo not showing latest commits

15,253

Solution 1

Check first your status and branches:

git status
git branch

If you don't see a branch preceded with a *, that means you are working in a detached HEAD branch.

If that is the case, simply reset your master branch to your current HEAD and push again:

git checkout -B master @
git push

The OP jebmarcus confirms in the comments to be on the master branch though, and with a clean status:

When I refreshed the repo this morning everything is working again

That must have been a glitch on GitHub side.
There were connection issues on GitHub (there was a "Minor service outage" on August 3rd -- GitHub status messages).

Solution 2

Happened to me a similar issue where github did not show latest commits on web. Apparently everything was up to date in my github remote repo, but I just had to re-enter my credentials with git push, in order to see the changes in browser.

First make sure your git user and remote repo are correct:

[repo-dir]$ git config user.email
your-user@email

[repo-dir]$ git remote -v
origin  https://github.com/your-user-name/your-repo (fetch)
origin  https://github.com/your-user-name/your-repo (push)

Then pull and push again:

[repo-dir]$ git pull origin master
From https://github.com/your-user-name/your-repo
 * branch            master     -> FETCH_HEAD
Already up-to-date.

[repo-dir]$ git push

Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/manosnoam/ansible-tempest-remote
   da33d75..ae56129  master -> master

A message has prompted me to enter my git username/password.

Right after that, I saw my commit changes in github web.

Share:
15,253
kevin_b
Author by

kevin_b

Updated on June 04, 2022

Comments

  • kevin_b
    kevin_b almost 2 years

    For some reason my Github repo is not showing the latest couple of commits. I did git add, git commit, and git push like I always do. But tonight it seemed to not have registered on the repo's commit history.

    When I do a git log, I can see my latest commits. When I do a git pull into a new folder to test it, my changes are there. When I manually take the commit url and put it in my browser, I can see the changes. It is just not showing up on the commit history and the overall number of commits on the project is not updating. Why is this?

  • kevin_b
    kevin_b over 7 years
    Thanks but when I do git branch I do see * master
  • kevin_b
    kevin_b over 7 years
    When I refreshed the repo this morning everything is working again
  • kevin_b
    kevin_b over 7 years
    git status said: On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean
  • VonC
    VonC over 7 years
    So yes, a refresh issue on Github side, then
  • kevin_b
    kevin_b over 7 years
    Thanks for your help anyway!
  • kevin_b
    kevin_b over 7 years
    I will accept this answer as it might help other people in their cases
  • VonC
    VonC over 7 years
    @jebmarcus OK, I have updated the answer with your conclusion as well, for more visibility.
  • Charlie Parker
    Charlie Parker over 2 years
    I am confused also also see * master...what is going on?
  • Charlie Parker
    Charlie Parker over 2 years
    this is confusing to me. I used to be able to push with git push without having to specify the origin (or the branch). But now I can't push without doing git push -u origin master. My removes look fine originn [email protected]:brando90/ultimate-utils.git (push) after going git remote -v...what happened to my git configuration than now I have to explicitly specify where I am pushing and git push by itself is not longer working?
  • VonC
    VonC over 2 years
    @CharlieParker Could you ask that in a separate question, with your OS, OS version, git version, and output of git branch -avv?