Skip to main content
Version: 0.1.0

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 possible
  • recursive: Three-way merge
  • ours: Keep our version on conflict
  • theirs: 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"

Next Steps