Skip to content

rebase-main-to-alpha.sh: git add -A stages untracked repos as orphaned gitlinks #1131

Description

@ktdreyer
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

User Story: As a release engineer, I want the alpha merge script to only stage tracked-file changes, so that stray directories in the worktree don't create orphaned gitlinks.

Problem

scripts/rebase-main-to-alpha.sh uses git add -A on lines 67 and 87 when staging conflict-resolution results during an automated main→alpha merge. git add -A stages all untracked content in the worktree, including directories that happen to be separate git repositories. Git records these as 160000 gitlink entries (submodule pointers) without a .gitmodules entry.

This is the root cause of #1130 — an orphaned platform-api-server gitlink that broke all ArgoCD sector deployments.

Fix

Replace git add -A with git add -u on lines 67 and 87 of scripts/rebase-main-to-alpha.sh.

git add -u only stages changes to already-tracked files, so stray directories in the worktree won't be picked up. The script's intent is to stage conflict-resolved files, not to add new untracked content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions