I found the way to do it using below command.
git grep -n "[my-lib-version]" $(git for-each-ref --format="%(refname:short)" refs/remotes/origin/)
replace my-lib-version with your jar file version