Skip to content

fix(push): exclude .git from copyDir to prevent submodule gitlink#12

Merged
jeff-r2026 merged 1 commit into
mainfrom
fix/push-exclude-git
May 19, 2026
Merged

fix(push): exclude .git from copyDir to prevent submodule gitlink#12
jeff-r2026 merged 1 commit into
mainfrom
fix/push-exclude-git

Conversation

@jeff-r2026
Copy link
Copy Markdown
Collaborator

Summary

  • When a skill directory is itself a git repository (e.g. user cloned a repo into .claude/skills/), copyDir would copy the .git directory into the team repo
  • Git then treats the nested .git as a gitlink (mode 160000 / submodule reference), causing git add to record only a commit hash instead of actual file content
  • The resulting MR appears to contain only Subproject commit <hash> — no real files

Fix: Add .git to the IGNORED_NAMES filter in src/utils/fs.ts

Test plan

  • Added unit test: should NOT copy .git directory when skill source is a git repo
  • All 936 existing tests pass
  • Type check passes (tsc --noEmit)

Fixes #10

…team repo

When a skill directory is itself a git repository (e.g. cloned from a
remote), copyDir would copy the .git directory into the team repo. Git
then treats the nested .git as a gitlink (mode 160000 / submodule
reference), causing `git add` to record only a commit hash instead of
the actual skill files. The resulting MR appears empty.

Add .git to the IGNORED_NAMES set so it is filtered out during copy.

Fixes #10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jeff-r2026 jeff-r2026 merged commit 0e8d3b9 into main May 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] teamai push cannot work in .git skill

1 participant