From 6d52228d94c9654f831d2662d4736b8f3f2b0eda Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 9 Feb 2026 16:01:18 -0700 Subject: [PATCH] fix(sdlc): auto-resolve merge conflicts in .sdlc/ state files Both main and the feature branch modify .sdlc/state.yaml during the SDLC lifecycle. Use -X theirs to auto-resolve conflicts in favor of the feature branch, whose state is more current. Co-Authored-By: Claude Opus 4.6 --- cmd/sdlc/cmd_merge.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/sdlc/cmd_merge.go b/cmd/sdlc/cmd_merge.go index 546a354..778ed71 100644 --- a/cmd/sdlc/cmd_merge.go +++ b/cmd/sdlc/cmd_merge.go @@ -122,8 +122,10 @@ var mergeCmd = &cobra.Command{ mergeRef = "origin/" + f.Branch } - // Merge - mergeArgs := []string{"merge"} + // Merge with -X theirs to auto-resolve .sdlc/ state conflicts. + // Both main and feature branch modify .sdlc/state.yaml; the feature + // branch version is more current and post-merge updates will overwrite. + mergeArgs := []string{"merge", "-X", "theirs"} if strategy == "squash" { mergeArgs = append(mergeArgs, "--squash") }