Search code examples
gitgithubsshcommitgit-commit

Github repo not showing latest commits


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?


Solution

  • 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).