Gitignore
gitignore is a plain text file used by Git to determine which files and directories should be ignored by version control. It helps keep a repository clean by excluding build outputs, locally generated data, and other environment-specific files from being committed. A repository can contain a .gitignore at the root and additional .gitignore files in subdirectories to apply rules locally. A global ignore list can also be configured so certain patterns apply across all repositories on a system.
Pattern syntax is defined per line in a .gitignore file. Lines starting with # are comments, and
- *.log
- build/
- /vendor/
Notes on behavior: If a file is already tracked by Git, adding it to .gitignore will not
---