我有一个有许多项目的monorepo,我想得到一个特定项目的所有提交。
例如:我有github.com/owner/repo,下面有目录、web、移动和服务器。 我想从github api获取一个项目的所有提交。 很不幸我没有找到办法…
我也不知道github api是否可以做到这一点,但是如果您在本地克隆repo并使用git cli,那么一切都很简单:
git clone https://github.com/example/example cd example git log --follow --pretty=%H -- <folder>
这将列出其中任何文件所在的所有提交sha <folder> 改变了。
<folder>