.gitignore file is a text file that tells Git which files or folders it shouldn't track — for example, log files, build outputs, and sensitive information.
bash
# Create a file named .gitignore
# Log files
*.log
# Node.js dependencies folder
node_modules/
# macOS system file
.DS_StoreYou should see
(Files/folders listed in this file won't get staged by the git add . command)