How to retrieve git commit history for specific time period with cURL?

前端 未结 2 454
故里飘歌
故里飘歌 2021-01-29 01:14

I am trying to retrieve commit history as JSON and output in a txt file.

curl https://api.github.com/repos/username/repo/commits > commitHistory.txt
         


        
2条回答
  •  野性不改
    2021-01-29 01:44

    You can use since and until parameters to get commits only for specific time period:

    curl https://api.github.com/repos/username/repo/commits?since=2016-11-01T00:00:00Z&until=2016-11-01T23:59:59Z
    

    For details: See api doc .

提交回复
热议问题