At the moment I use git ls-remote
to check if a some changes are present on Gerrit server. But not all changes are can be checked is way, particularly merges which do not appear in git ls-remote
output.
How can I check if a change is present on Git server without cloning the repo. I'm aware git -r --contains
can be used from within the repository.
Since
gerrit
is among the tags, I assume you are using Gerrit.For a commit which has been pushed for review (
refs/for/foo
), you can use gerrit query or Query Changes to check if it's on the server.For any commit, if you have access to the Gerrit server and you know the repository name, you can use
ssh
to run git commands (git rev-parse
orgit log
) on the Gerrit repository.