.gitignore is a text file that tells Git which files and folders to ignore, so they are never tracked or committed.