Skip to content

Instantly share code, notes, and snippets.

@phargogh
Created April 4, 2020 00:57
Show Gist options
  • Save phargogh/00c2342ee387d56c2e0f12abed134e9c to your computer and use it in GitHub Desktop.
Save phargogh/00c2342ee387d56c2e0f12abed134e9c to your computer and use it in GitHub Desktop.
Getting the latest SHA on master for a GitHub repository
#!/bin/sh
# jq -r prints the 'raw' value.
curl https://api.github.com/repos/natcap/invest.users-guide/commits/master | jq -r .sha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment