A .gitignore file tells Git which files or folders to ignore in a project. It's usually placed in the root directory of a repository.
dist/
, build/
)node_modules/
, vendor/
).env
).DS_Store
on macOS).vscode/
, .idea/
)file.txt
- Ignores exact filename*.txt
- Ignores all .txt filesbuild/
- Ignores build directory and its contents**/logs
- Ignores logs directories in any location!important.txt
- Never ignore important.txtReady to create your .gitignore? Choose a template for your project: