Possible Duplicate:
git bash : how to check if there’s a new commit available
I am writing a script where I would like to compare the latest local commit to the latest upstream commit in order to tell the user there are commits to be pulled.
The latest local commit SHA is displayed with git log | head -n 1 | awk '{print $2}'
.
Is there an equivalent for printing the SHA1 of the latest upstream commit?