CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Developer
How-to

How do I generate a .gitignore file for my project?

Short answer

Use a browser-based .gitignore generator to pick your languages, frameworks and tools and it assembles the matching ignore rules into one file. It runs on your device and saves you from hand-writing the patterns that keep build output, dependencies and secrets out of your git repository.

What belongs in a .gitignore

A .gitignore tells git which files never to track: dependency folders like node_modules, build artifacts, editor and OS files like .DS_Store, log files, and crucially local secret files like .env. Getting these right from the start keeps your repository clean and, more importantly, stops credentials and generated files from being committed by accident.

Why a generator beats memory

Each language and tool has its own set of files worth ignoring, and remembering all of them for a mixed stack is error-prone. A generator lets you select the technologies you use, then combines the well-known ignore patterns for each into a single file you can drop at your project root. The result is assembled in your browser, so nothing about your project is sent anywhere.

Step by step

  1. Pick your stack. Select the languages, frameworks and tools your project uses.
  2. Generate locally. The tool assembles the matching ignore rules in your browser.
  3. Add it to your repo. Save the output as .gitignore at the root of your repository.

Frequently asked questions

What should always be in a .gitignore?

Dependency folders, build output, editor and OS files, log files, and local secret files like .env.

Where does the .gitignore file go?

At the root of your repository, though you can also place additional .gitignore files in subdirectories.

Is my project information uploaded?

No. The file is assembled entirely in your browser.

Related answers