Reputation: 477
I know one way to a git log
is to do a git clone
of a repo. from somewhere where there is a git repo. So if there is a large git repo. on github.com and I just want a git log of the repo. either between the last release and now or even just a raw git log is it possible without cloning the repo. ? If yes, how do I go about doing that. You can use any git repo. on github to share ways to do the same. I tried on the interwebs if there was any way to do the same but came up short.
Upvotes: 11
Views: 22454
Reputation: 18218
You want to use this Github api endpoint:
Compare two commits GET /repos/:owner/:repo/compare/:base...:head Both :base and :head must be branch names in :repo. To compare branches across other repositories in the same network as :repo, use the format :branch. For example:
GET /repos/:owner/:repo/compare/hubot:branchname...octocat:branchname
Upvotes: 1
Reputation: 1329112
You can only do so if the remote server which provide the Git repo hosting service also provides an API.
For instance, GitHub allows you to get the log of a git repo (without cloning it first), with listing the commits on a repository
GET /repos/:owner/:repo/commits
You can add several parameters to limits the commits you want, like ?sha=xxx
, a SHA or branch to start listing commits from.
Upvotes: 4