How to check for changes on remote (origin) git repository?

Posted by Lernkurve on Stack Overflow See other posts from Stack Overflow or by Lernkurve
Published on 2010-03-25T09:22:51Z Indexed on 2010/03/29 20:53 UTC
Read the original article Hit count: 664

Filed under:

Question

What are the Git commands to do the following workflow?

Scenario: I cloned from a repository and did some commits of my own to my local repository. In the meantime, my colleagues did commits to the remote repository. Now, I want to:

  1. Check whether there are any new commits from other people on the remote repository, i.e. "origin"?

  2. Say there were 3 new commits on the remote repository since mine last pull, I would like to diff the remote repository's commits, i.e. HEAD~3 with HEAD~2, HEAD~2 with HEAD~1 and HEAD~1 with HEAD.

  3. After knowing what changed remotely, I want to get the latest commits from the others.

My findings so far

For step 2: I know the caret notation HEAD^, HEAD^^ etc. and the tilde notation HEAD ~2, HEAD~3 etc.

For step 3: That is, I guess, just a git pull.

© Stack Overflow or respective owner

Related posts about git