Skip to main content

Options

string
required
Commit SHA to fetch metadata for. Any revision Git can resolve is accepted (full SHA, short SHA, branch name, tag).

Response

object
Commit metadata. Extends the shape returned by listCommits() with two signature fields that are only populated on this single-commit endpoint.
The commit object contains:
  • sha
  • parentShas — parent commit SHAs in Git parent order; empty for root commits. Python: parent_shas; Go: ParentSHAs.
  • message
  • authorName, authorEmail
  • committerName, committerEmail
  • date (parsed Date in TypeScript, datetime in Python, time.Time in Go)
  • rawDate (RFC 3339 string as returned by the server)
  • signature — the armored signature taken from the commit’s signature header. Omitted for unsigned commits.
  • payload — the exact bytes the signature is computed over. Omitted for unsigned commits.
The signature/payload pair mirrors GitHub’s commit verification object, so you can verify a signature yourself by checking signature against payload:
TypeScript

Notes

  • This endpoint does not compute or return the commit diff. Use getCommitDiff() when you need file changes as well.
  • For listing many commits at once, prefer listCommits() — the per-commit shape is identical except that signature and payload are only returned by getCommit().
  • signature and payload let clients verify commit signatures independently. The server enforces signatures at push time through the verify-sig branch-protection policy.