question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a `.gitignore` to examples missing it.

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Timercommented, Jul 13, 2020

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.

1reaction
tanmaylaudcommented, Jul 13, 2020

Hi I have an open PR for this issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found