-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
.gitignore is being overwrittern by prisma init
#8496
Comments
What should be the expected behavior if .gitignore exists? Is it as suggested by OP or something else as well? |
@ShubhankarKG If a |
modify/append the content seems much better. |
Yes, but the complexity of that is much higher for a edgecase feature. Choosing the simpler way to just skip the file sounds perfectly fine in this case - and is much less to maintain. |
Came here from adding Prisma to an existing project. The "Prisma Getting Started: Add to an existing project" guide instructs to run |
There is an open PR at #8509 that should solve the |
New PR: #8946 |
Bug description
When you run
npx prisma init
everything executes without problems but the.gitignore
file is being overwritten with the following content mentioned in Issue #3400How to reproduce
npm
project.gitignore
npx prisma init
.gitignore
file and notice it was overwrittenExpected behavior
The expected behavior may be simply not overwrite the
.gitignore
if it already exists, instead just output some message like: Be sure to exclude node_modules and .env files inside .gitignore.Prisma information
Nothing. I'm just starting prisma
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: