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

Issue

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 ?

Solution

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

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

Answered By – Philip Oakley

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published