简体   繁体   中英

how to get git log from a repo. in github.com?

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM