jebmarcus jebmarcus - 2 months ago 12x
Git Question

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?


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