Many examples don't currently include a .gitignore, which is fine when using create-next-app, but it will cause the example to not have it by other means, like a manual download or using the deploy to Vercel button.
The .gitignore file should look like this:
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
# testing
/coverage
# Next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# Vercel
.vercel
If the example has other files that need to be ignored, feel free to add them. And if the example already has a .gitignore that's not ignoring the files listed above, updates to it are also welcome!
I'd be willing to tackle this over the course of the next week!
Hi I have an open PR for this issue
@tanmaylaud I noticed you didn't do all the examples. Do you intend to continue the work on this ticket?
@tanmaylaud I noticed you didn't do all the examples. Do you intend to continue the work on this ticket?
@amorriscode I considered the examples with vercel deployment. Is gitignore required for all the examples?
@tanmaylaud based on my interpretation of the issue, I think they should all have them. If someone manually downloads the examples, for instance, they will want the .gitignore.
I had claimed this issue but you got to it before me. If you want to keep going with the rest of the examples that would probably be useful!
@tanmaylaud based on my interpretation of the issue, I think they should all have them. If someone manually downloads the examples, for instance, they will want the
.gitignore.I had claimed this issue but you got to it before me. If you want to keep going with the rest of the examples that would probably be useful!
@amorriscode , sorry for claiming it. I saw that you already are an active contributor to nextjs whereas I am trying to start.
Regarding the issue, I thought I should wait for a reviewer to comment/clarify before I add gitignore to all files. I have done the bare minimum for now.
Every single example needs the .gitignore added or merged with its existing one! A script should probably be wrote that automates this and checked into the PR, since we'll want to update the default ignore list in the future.
@Timer
I have added .gitignore to all examples.
I have also added a script
Please review