I want to check whether a particular Git commit sha1 exists on a specific remote. I tried the following command:
git fetch <remote> <revision> -q --dry-run
The problem is that the command returns success not only when the revision is present on the remote, but also when it is present locally.
Is there some way to check this ignoring the local revision?