From the course: Git from Scratch
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
.gitignore: Ignore files - Git Tutorial
From the course: Git from Scratch
.gitignore: Ignore files
- [Educator] Having git observe and keep track of everything in your project is useful. But in most projects you'll have files and folders you don't need to, or want to keep track of. Things like system files or local project settings or dependency libraries, et cetera. You can exclude any file or folder from your git repository by adding them to the dot gitignore file. Yes, the file name is punctuation mark, gitignore. The punctuation goes first and yes, that's weird but that's how it works. In the gitignore file, make a list of file names, folder names and other items you don't want git to track and git will simply ignore them. Thus the name gitignore. Want to start monitoring a file you previously ignored? Simply remove the mention of the file inside the gitignore file and git will start tracking it again. Easy as that.