Use rev-parse
git rev-parse origin/master # to get the latest commit on the remote
git rev-parse HEAD # to get the latest commit on the local
Use rev-parse
git rev-parse origin/master # to get the latest commit on the remote
git rev-parse HEAD # to get the latest commit on the local