Reputation: 2448
Is there a way to get a remote repository's log history without cloning it or adding it to the origin
first?
I tried git log <repository url>
, and clearly it didn't work.
UPDATE (2019-12-15)
Following torek's answer, I found these 2 APIs from GitHub that would allow me to get a repository's commit history: 1st one from its REST API v3, 2nd one from its GraphQL API v4.
Upvotes: 2
Views: 1473
Reputation: 488183
Is there a way to get a remote repository's log history without cloning it ...
Not in Git, no.
Technically, there isn't a log history at all. In Git, history is commits. The commits are the history. So you either have them—the commits—and therefore have the history that git log
can show, or you don't.
Various hosting providers add their own software layers atop Git, and those may provide ways to get the parent hash IDs and commit-log-message metadata—the information that git log
uses and shows by default—without cloning or fetching the commits. But that's up to the hosting provider, and each one does it differently, if they do it at all.
Upvotes: 3