diff --git a/scripts/push-split.sh b/scripts/push-split.sh index 779b8e3..8296107 100644 --- a/scripts/push-split.sh +++ b/scripts/push-split.sh @@ -54,7 +54,19 @@ trap 'git branch -D "$branch" >/dev/null 2>&1 || true' EXIT echo "→ splitting $prefix/ into ephemeral branch $branch …" git subtree split --prefix="$prefix" HEAD -b "$branch" >/dev/null +# Silent Mode public repos do not carry AI-tool attribution in commit metadata +# (see CLAUDE.md at the repo root). Strip any "Co-Authored-By: Claude ..." / +# "Co-authored-by: Claude ..." trailers from the ephemeral branch before push. +# Local monorepo history is untouched — only what lands on the forge is filtered. +echo "→ scrubbing Co-Authored-By: Claude trailers from $branch …" +FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force --msg-filter ' + sed -e "/^Co-[Aa]uthored-[Bb]y: Claude.*/d" +' "$branch" >/dev/null 2>&1 +# filter-branch leaves refs/original/refs/heads/$branch as a backup — delete it +# so it can not be pushed by accident (--mirror isn't used here, but be safe). +git update-ref -d "refs/original/refs/heads/$branch" 2>/dev/null || true + echo "→ pushing $branch → $remote:master …" -git push "$remote" "$branch:master" +git push --force "$remote" "$branch:master" echo "✓ done — see https://code.silentmode.st/silentmode/$remote"