Compare local repo to GitHub repo #22797
-
I edited a file on my GitHub repo (origin/master) and committed it. I want to be able to compare my local repo to GitHub. I expect to see that one (or more) of the files on GitHub are different from what I have locally. On the local:
but
is not showing me the commit that was made on GitHub. I’m expecting to see something about commit ef714fa
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did you do a |
Beta Was this translation helpful? Give feedback.
-
I had not done a fetch. As I read about that command, it makes sense. I guess that when I saw a reference to origin/master in the 42f36 commit (see below), it was telling me how things are right now.
But I guess it shows how things were the last time the local repo looked at the remote repo. That “look” happened on my last push. And I’ll need something else to cause a “look” – like a fetch. Thanks for the enlightenment! |
Beta Was this translation helpful? Give feedback.
Did you do a
git fetch origin
to get updates from the repository on Github?git log
operates only on the locally known data.