Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug: Migration mode should not clobber .gitignore #1354

Open
3 tasks done
danvk opened this issue Feb 28, 2024 · 1 comment
Open
3 tasks done

🐛 Bug: Migration mode should not clobber .gitignore #1354

danvk opened this issue Feb 28, 2024 · 1 comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

Comments

@danvk
Copy link
Contributor

danvk commented Feb 28, 2024

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

For an existing project, the .gitignore file has probably accumulated lots of stuff that should be ignored.

I expected the migration script to add to .gitignore or adjust it, not to completely clobber it.

Actual

Running npx create-typescript-app completely clobbers the .gitignore file, replacing it with a two-liner.

Additional Info

I wound up with lots of previously-untracked files added to my repo after running the migrate script over at danvk/literate-ts#246

For example: I was ignoring the coverage directory, which contained HTML reports of code coverage that I would periodically generate. After migration, git wanted to track this.

@danvk danvk added the type: bug Something isn't working :( label Feb 28, 2024
@JoshuaKGoldberg JoshuaKGoldberg added the status: accepting prs Please, send a pull request to resolve this! label Mar 5, 2024
@JoshuaKGoldberg
Copy link
Owner

Agreed, makes sense. I think there should be a similar approach to how the migration handles existing dependencies: known no-longer-necessary ones should be removed, and other existing ones retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(
Projects
None yet
Development

No branches or pull requests

2 participants