yer*_*lom 5 git github github-api
我有一个包含许多项目的 monorepo,我想获得特定项目的所有提交。
例如:我有 github.com/owner/repo,在此下我有目录、网络、移动设备和服务器。我想从 Github API 获取一个项目的所有提交。不幸的是我没有找到办法做到这一点......
我也不知道这是否可以通过 GitHub API 实现,但是如果您在本地克隆该存储库并使用 Git CLI,那么一切都很简单:
git clone https://github.com/example/example
cd example
git log --follow --pretty=%H -- <folder>
Run Code Online (Sandbox Code Playgroud)
这将列出其中任何文件发生<folder>更改的所有提交 SHA。