Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

fix: preserve gitignored files during convert-to-worktree - #16

Merged
davidpoblador merged 1 commit into
mainfrom
fix/preserve-gitignored-files
Feb 7, 2026
Merged

fix: preserve gitignored files during convert-to-worktree#16
davidpoblador merged 1 commit into
mainfrom
fix/preserve-gitignored-files

Conversation

@davidpoblador

Copy link
Copy Markdown
Member

Summary

  • Gitignored files (e.g. .env, secret/) were silently destroyed during convert-to-worktree because neither the copier nor manual path carries untracked files
  • Now detects gitignored files before conversion, warns about them, and restores them to the project root after conversion
  • Covers both copier and manual conversion paths, including cleanup on copier failure

Test plan

  • Run tests/test_convert_preserves_gitignored.sh (validates root-level and nested gitignored files survive manual conversion)
  • Manually test with copier path: create a repo with .env, run convert-to-worktree, verify .env is at project root
  • Verify conversion without gitignored files still works (no regression)

🤖 Generated with Claude Code

Gitignored files (e.g. .env) were silently destroyed during conversion
because neither the copier nor manual path carries untracked files.
Now detects them before conversion, warns, and restores to project root.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidpoblador
davidpoblador merged commit 915e274 into main Feb 7, 2026
1 check passed
@davidpoblador
davidpoblador deleted the fix/preserve-gitignored-files branch February 7, 2026 22:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant