Skip to content

Commit 7fddba2

Browse files
ktdreyerclaude
andcommitted
use "git add -u" in merge script
"git add -A" stages all untracked content, including stray cloned repositories that happen to exist in the worktree. These get recorded as orphaned gitlinks, which break ArgoCD sync because the referenced submodule commits do not exist in the remote. "git add -u" limits staging to already-tracked files, which is the correct intent during conflict resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d259f02 commit 7fddba2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/rebase-main-to-alpha.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if [ "${REBASE_EXIT}" -ne 0 ]; then
6464
log "Rebase encountered conflicts. Collecting conflict state..."
6565

6666
# Stage all files — conflict markers will be preserved in working tree
67-
git add -A || true
67+
git add -u || true
6868

6969
CONFLICT_FILES="$(git diff --name-only --diff-filter=U HEAD 2>/dev/null || git status --short | grep '^UU' | awk '{print $2}' || echo "(see git status)")"
7070

@@ -84,7 +84,7 @@ ${CONFLICT_FILES}
8484
Please resolve conflicts and merge this PR manually.
8585
Generated by scripts/rebase-main-to-alpha.sh on ${TIMESTAMP}." || {
8686
# Merge also has conflicts — stage everything and commit with markers
87-
git add -A
87+
git add -u
8888
git commit --no-verify -m "chore: best-effort merge main into alpha (conflicts present)
8989
9090
Automated merge of upstream/main into upstream/alpha.

0 commit comments

Comments
 (0)