curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/rebase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resolutions": [
{
"path": "<string>",
"resolution": "useLeft",
"content": "<unknown>",
"hash": "<string>"
}
]
}
'{
"success": true,
"newBaseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"newCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stats": {
"filesChanged": 123,
"conflictsResolved": 123
}
}Rebases a branch onto the latest main branch commit.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/branches/{branchId}/rebase \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resolutions": [
{
"path": "<string>",
"resolution": "useLeft",
"content": "<unknown>",
"hash": "<string>"
}
]
}
'{
"success": true,
"newBaseCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message": "<string>",
"newCommitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stats": {
"filesChanged": 123,
"conflictsResolved": 123
}
}Personal access token is obtained through your profile
Project ID
Branch ID or "main" for the default branch
Conflict resolutions for rebasing
Show child attributes
Rebase result
Was this page helpful?