API ReferenceGit
Compare two commits
Get the comparison between two commits in a repository
Path Parameters
repo*string
The repository id
Format
uuidQuery Parameters
base*string
Base revision (commit SHA, branch name, tag, or any valid Git revision)
head*string
Head revision (commit SHA, branch name, tag, or any valid Git revision)
Response Body
application/json
curl -X GET "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/compare?base=main&head=dev"{
"status": "identical",
"ahead_by": 0,
"behind_by": 0,
"total_commits": 0,
"files": [
{
"sha": "string",
"filename": "string",
"status": "added",
"additions": 0,
"deletions": 0,
"changes": 0,
"previous_filename": "string"
}
]
}