From the course: Learning Git and GitHub

Unlock this course with a free trial

Join today to access over 23,100 courses taught by industry experts.

Ignoring files

Ignoring files

- [Instructor] Git is great at tracking files but you don't always have to track everything. You could have some files with some passwords or other sensitive information that you don't want to share with others. That could be authentication tokens, API keys, et cetera. Ignored files aren't uploaded to GitHub, so this is a great way to add notes that you don't need to share with others. So, for example, a great place to keep to-do items. Operating systems and applications can have settings that you don't need to share as well. macOS, for example, keeps a file called .DS_Store on most folders to keep track of all the files within those folders. Visual Studio Code can have a list of local preferences in a vscode folder. To take care of ignoring files, you can create a .gitignore file at the root level of your project, and inside that file, you can add any type of file or patterns that you want to ignore. For example…

Contents