Is there a way to get all the commit IDs for a particular branch without cloning the repository or using the API's?

I'm looking for something like this. Unfortunately the below command works only within the repository (i.e., git directory). I want to able to do it without cloning the repo.

```sh
git rev-list --remotes=*master 

```

For example, the below command brings all the branches and it's last commit ID (**Note:** the command works without having to clone the repo.) 

```sh
git ls-remote -h http://user:password@example.gitlab.com/ProjectA/example.git 

```

Sample output:

```
82cd0dcc9d1005b44bdc799034b706f9ad2b1e0e    refs/heads/master
afacc961fedf49a84c09ab91e67633b02921dd07    refs/heads/projects/myproject
b6d954ec86750dcfd35c1c3fba4f40449abeb6ed    refs/heads/releases/production
e891a0b29847d0d7dfc5bc7e5ad45f718918f67f    refs/heads/releases/ready_for_prod
7b0282004a6f72c5803ddf19172c16a0b3124038    refs/heads/releases/test

```