Merging Changes
Merge changes from one branch to another.
Merge a Branch
curl -X POST \
http://localhost:8080/api/management/repositories/default/myapp/branches/main/merge \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_branch": "feature-xyz",
"strategy": "fast-forward"
}'
Merge Strategies
fast-forward: Fast-forward merge if possiblerecursive: Three-way mergeours: Keep our version on conflicttheirs: Take their version on conflict
Resolve Conflicts
If merge conflicts occur:
curl -X POST \
http://localhost:8080/api/management/repositories/default/myapp/branches/main/resolve-merge \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"conflicts": [
{
"node_id": "01HQRS...",
"resolution": "ours"
}
]
}'
Compare Branches
curl http://localhost:8080/api/management/repositories/default/myapp/branches/feature-xyz/compare/main \
-H "Authorization: Bearer TOKEN"