Up and Running with Git Transcripts
Chapter: Our first git repository
Lecture: Concept: .gitignore file

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's quickly review ignoring files in any git hub repository at the very top,
0:05 directly next to the .git folder.
0:07 If you have a .git,
0:08 ignore file, you can match all sorts of patterns that are going to be ignored
0:13 for automatic group operations like git add. which adds everything recursively or you saw
0:21 in the tools they find all the files that maybe need to be added and suggest
0:25 them to you. If you want to exclude some things like build files and cache
0:29 files and so on, then you just edit this.
0:32 git ignore you here, you can see we've got the first one is done to
0:35 pycache/ That's everything under that folder.
0:39 We have *.py[COD] or *.SO.
0:43 These are everything that matches that pattern and so on.
0:47 When you create your repository, this is automatically selected on a per language basis.
0:52 So for example, C++ has one set of working files that python might
0:57 not care about or ever encounter and vice versa.
1:01 Similarly, C# might have something very different than say python.
1:05 Okay, like DLL files and
1:08 obj files and whatnot. So make sure that you pick the right git ignored the
1:13 one for your language. When you look at that list,
1:15 you saw a great long list of actual language files.
1:19 Did you know that you can go over to github.com /github/git
1:24 ignored and they actually have one,
1:26 you know, for every single language.
1:28 So if you want to see what's going on in those git ignored,
1:31 you can come over here and say well here's what a swift git ignore file looks
1:35 like. And so if you want to say grab the stuff from
1:39 C# C++ and python and squish it together or git QT
1:43 In python or something like that.
1:45 Well you can go over here and if you really really want to make a change
1:48 you could even suggest a change to the global python git ignored and you're like
1:52 I don't know how hard it is to get something in there.
1:55 Probably pretty hard but it is open here in github so you can look at it and make suggested changes.