I need to receive the data about revisions, file changes and number of code lines changed without cloning the repo, the only thing I have is a repo url. The only command I found for viewing remote changes is git ls remote, but it's output is too poor. How can I do that?
There is no way to do what you asked using only the Git protocols.
Depending on how the repository is hosted, you may be able to get some of the information via a web interface. gitweb is distributed with Git and big hosting services often have their own web interfaces.
If you are going to be doing any significant digging around in the history it will probably be worth cloning the repository (and it is likely to be the only way if the hosting service does not have a web interface of some kind). You will have to use some disk space but your investigation will not be limited to what the web interface provides and it will be much faster.
One other possibility is git archive; it is an optional server, so it may not be enabled for the server hosting your repository. It allows you to download archives (e.g. tar or zip files) of individual trees. Technically, you could extract such archives and manually diff them to derive the information you are after, but it would likely be more cumbersome and less efficient than just cloning the repository and using the normal tools (i.e. git log
with --stat
or --numstat
with or without -m
/-c
/--cc
).
If your repository URL is for a ssh type connection then you can issue a remote log command via ssh, e.g.
If you could have cloned using the command:
git clone username@host:/path/to/repository.git
Then you should be able to issue a log command using:
ssh username@host git --git-dir /path/to/repository.git log
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With