Skip to content

Commit b2b353c

Browse files
authored
fix: use git add -u in merge script to avoid orphaned gitlinks (#1133)
## Summary - Replace `git add -A` with `git add -u` in `scripts/rebase-main-to-alpha.sh` (both occurrences on lines 67 and 87) - `git add -A` stages all untracked content, including stray cloned repositories in the worktree, which get recorded as orphaned gitlinks that break ArgoCD sync - `git add -u` only stages changes to already-tracked files, which is the correct behavior during conflict resolution Fixes #1131
2 parents 84af240 + 7fddba2 commit b2b353c

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)