Git: How to check if a local repo is up to date?

Misha Moroshko picture Misha Moroshko · Oct 29, 2011 · Viewed 134.7k times · Source

I would like to know if my local repo is up to date (and if not, ideally, I would like to see the changes).

How could I check this without doing git fetch or git pull ?

Answer

Philip Oakley picture Philip Oakley · Oct 29, 2011

Try git fetch --dry-run The manual (git help fetch) says:

--dry-run
Show what would be done, without making any changes.