2

I want to check if origin/master differs from my HEAD.

I do not want to git fetch, as it may be very expensive - I abuse git in a way that makes the cost prohibitively high.

Anything that would allow me to get a list of commits or a top commit from the remote without actually downloading the objects would be fine.

Is there any possibility to do this?

Piotr Zierhoffer
  • 5,005
  • 1
  • 38
  • 59

1 Answers1

1

Try to use

git ls-remote http://yourproject.git origin/master

It will return the last SHA of commit in remote master branch

Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116