Skip to content

Add sync-files command#54

Merged
sjquant merged 1 commit into
mainfrom
sjquant/sync-files-command
May 17, 2026
Merged

Add sync-files command#54
sjquant merged 1 commit into
mainfrom
sjquant/sync-files-command

Conversation

@sjquant
Copy link
Copy Markdown
Owner

@sjquant sjquant commented May 17, 2026

Why

Private, gitignored files like .env.local and .npmrc often need to follow every new worktree, but configuring an afterCreate hook for file copying is manual and puts a common workflow in the wrong abstraction.

Changes

  • Add gji sync-files list|add|remove to manage per-repo syncFiles entries in global config.
  • Preserve existing tilde-keyed per-repo config entries, support parent-position --json, emit JSON errors in JSON mode, and avoid config churn for no-op removes.
  • Reuse sync file path validation before writing config, and clean up empty per-repo entries when the last file is removed.
  • Wire the command into CLI registration, shell completions, README docs, and website docs.
  • Cover the command with integration tests, including end-to-end copying into a new worktree and regressions from review.

Verification

  • pnpm build
  • pnpm test
  • pnpm --dir website build
  • pnpm --dir website typecheck

@sjquant sjquant self-assigned this May 17, 2026
@sjquant sjquant force-pushed the sjquant/sync-files-command branch 3 times, most recently from 46fbf6e to 2484c29 Compare May 17, 2026 08:11
@sjquant sjquant force-pushed the sjquant/sync-files-command branch from 2484c29 to ce818ca Compare May 17, 2026 08:14
@sjquant sjquant merged commit ca1edc7 into main May 17, 2026
3 checks passed
@sjquant sjquant deleted the sjquant/sync-files-command branch May 17, 2026 08:31
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.

1 participant