Project FilesLesson 189Free preview
.gitignore Generator
This lesson is part of Web Developer Tools · All levels
Summary
The .gitignore generator helps compile a list of file and folder patterns that Git does not need to track, such as node_modules, build results, or secret .env files. You select a template according to the programming language, operating system, and editor, and then copy the result to the file .gitignore in the root repository. This only affects untracked files, so the files that are in-commit sequence have to be manually removed.
Key points
- One pattern written per line and a commentary marked #
- Folders are usually marked with a slash at the end, for example dist/
- Mark! excluding the file from the previous pattern
- The tracked files are not automatically ignored; use git rm --cached
- Language templates, OS, and editors can be combined into one file
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.