Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git log missing latest commit

I pushed a commit from my MacBook into the master branch of a project, but the commit doesn't appear on my Windows laptop (git log), it only appears on my MacBook (git log) or on the Bitbucket web interface of the repo.

How is that possible?

Both git local repos are referring to the same branch (master), and to the same bitbucket repo (one is pointing to it via SSH, the other (Windows) via HTTPS).

Commit happened 40 minutes ago, so I doubt any delay is occuring here.

like image 591
manuchaud100 Avatar asked Oct 16 '22 06:10

manuchaud100


2 Answers

Even after a pull/fetch, a simple git log (which defaults to git log master) would not show the commit pushed.

Try git log origin/master (after at least a git fetch)

like image 149
VonC Avatar answered Oct 31 '22 12:10

VonC


Try to run git fetch or git pull on the Windows laptop.

Git Log does not update automatically on every push to the origin repository.

git fetch will fetch the changes from the remote repo but won't merge them into your local repo, while git pull will fetch the changes and try to merge them into your local repo.

Here are some useful inks:

  • git pull
  • git fetch
like image 34
ArielGro Avatar answered Oct 31 '22 13:10

ArielGro