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
- [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
-
-
-
Understanding version control1m 53s
-
(Locked)
What is Git?2m 16s
-
(Locked)
Setting up Git4m 35s
-
(Locked)
Understanding Git environments5m 51s
-
(Locked)
Ignoring files4m 5s
-
(Locked)
Deleting and renaming files6m 8s
-
(Locked)
Differences4m 9s
-
(Locked)
Changing history12m 7s
-
(Locked)
Branches6m 13s
-
(Locked)
Merge conflicts10m 7s
-
(Locked)
Git stash and clean9m 27s
-
-
-
-
-