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 >
curl https://api.github.com/repos/username/repo/commits > commitHistory.txt
You can use since and until parameters to get commits only for specific time period:
since
until
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 .