What is a .gitignore file?
A .gitignore file tells Git which files and directories to exclude from version control. It is a plain text file at the root of your repository where each line is a pattern - matching files (like build output, dependencies, secrets, and editor caches) are kept on disk but never committed.