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, directly next to the .git folder. If you have a .git,
0:09
ignore file, you can match all sorts of patterns that are going to be ignored
0:14
for automatic group operations like git add. which adds everything recursively or you saw
0:22
in the tools they find all the files that maybe need to be added and suggest them to you. If you want to exclude some things like build files and cache
0:30
files and so on, then you just edit this. git ignore you here, you can see we've got the first one is done to
0:36
pycache/ That's everything under that folder. We have *.py[COD] or *.SO. These are everything that matches that pattern and so on.
0:48
When you create your repository, this is automatically selected on a per language basis.
0:53
So for example, C++ has one set of working files that Python might not care about or ever encounter and vice versa.
1:02
Similarly, C# might have something very different than say Python. Okay, like DLL files and
1:09
obj files and whatnot. So make sure that you pick the right git ignored the one for your language. When you look at that list,
1:16
you saw a great long list of actual language files. Did you know that you can go over to github.com /github/git ignored and they actually have one,
1:27
you know, for every single language. So if you want to see what's going on in those git ignored,
1:32
you can come over here and say well here's what a swift git ignore file looks like. And so if you want to say grab the stuff from
1:40
C# C++ and Python and squish it together or git QT In Python or something like that.
1:46
Well you can go over here and if you really really want to make a change
1:49
you could even suggest a change to the global Python git ignored and you're like I don't know how hard it is to get something in there.
1:56
Probably pretty hard but it is open here in github so you can look at it and make suggested changes.