tags:

views:

54

answers:

1

git diff --quiet returns exit code as documented.

git log --quiet behaves exactly as without quiet.

Did I miss something from the docs:

--quiet 
    Disable all output of the program. Implies --exit-code.

git 1.6.0

This is supposed to be used in a script to compare mybranch with origin/mybranch, to know should I push it or not.

A: 
git rev-list -1 origin/master..master | wc -l

from the link suggested in the comments seems to be the best answer here

Antony Hatchkins