A .gitignore file tells Git which files and directories to leave untracked. Create it in the repository root, alongside the .git directory, before adding project files. section 2.3.2 section 2.3.1
Ignoring third-party package folders keeps recoverable dependencies out of the repository. Python projects commonly ignore venv/, while Node.js projects ignore node_modules/; requirements.txt and package.json record what can be reinstalled. section 2.3.2
Verify that ignoring works
After saving .gitignore, run git status. The ignored venv/ or node_modules/ directory should no longer appear among untracked files. If it remains, check that the file is saved and located beside .git. section 2.3.2

