gitreflog

Getting the sha1 of a desired commit from a remote repository


Using git reflog, a user can only access his local reflog information?

How can one see the sha1 of a desired commit from a remote repository?


Solution

  • Git reflog is a history of sha1s you had checked out. This is true for whatever repository you're in. If delete your repository and clone it again, you will have lost that history.

    The second question doesn't make sense. I'm guessing that you want to git fetch and then browse what is on the remote that you didn't merge yet. You would do that with git log master..origin/master to see what the remote master has that you don't.