Add a `.gitignore` to examples missing it.
See original GitHub issueMany 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!
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
What is Gitignore and How to Add it to Your Repo
The .gitignore file is a text file that tells Git which files or folders to ignore in a project. A local .gitignore file...
Read more >git - How to create a .gitignore file - Stack Overflow
The easy way that I do it is to go into the terminal and run vim .gitignore and then add the files. Usually...
Read more >Add Git Ignore to an existing Visual Studio Solution (New Git ...
Using Visual Studio to add a .gitignore ... Open Visual Studio and the solution needing an ignore file. From the top menu select...
Read more >Git: Ignore Files with .gitignore - Stack Abuse
With this file and very simple pattern matching, you can tell Git which types of files you want it to ignore and not...
Read more >The .gitignore File - Henrique Siebert Domareski
For example, to add all .txt files to the gitignore file, ... need to fix your gitignore file adding the configuration that is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.Hi I have an open PR for this issue