Meltemi
Meltemi

Reputation: 38349

Git command to see if repository has changed (no diff)

say I clone a git repo locally... time goes by and I want to see if anything has changed back at the origin... but i don't, necessarily, want to fetch or pull...yet.

what's the command for seeing a list of commits SINCE i last pulled...or just the fact that there HAVE been some commits since I last pulled?

i don't want overhead of diff in this case...

Upvotes: 3

Views: 532

Answers (4)

ivanpro
ivanpro

Reputation: 13

get all of the commits into local tracking branch:
git fetch

list all of the changes between tracking branch and HEAD:
git log origin/master HEAD

Upvotes: 0

Adam Dymitruk
Adam Dymitruk

Reputation: 129526

git remote show origin

Upvotes: 2

Šimon Tóth
Šimon Tóth

Reputation: 36433

You need to at least fetch, without that the repo will have no information about the remote repository. git diff --summary will then show you a short summary of the changes.

Upvotes: 1

Clueless
Clueless

Reputation: 4042

Try:

git fetch --dry-run

Upvotes: 1

Related Questions