Up and Running with Git Transcripts
Chapter: The '6' core git operations
Lecture: The .git folder

Login or purchase this course to watch this video and the rest of the course contents.
0:00 When I talk about your git repository and how it has not just your files,
0:04 your source files and other resources that go along with it like images,
0:08 but it has everything that has ever happened to them.
0:11 You might wonder how does that happen.
0:14 For example, if I clone a project here called project,
0:17 it has three files, file 1,2 and 3.py and it looks like there's
0:23 nothing else here. So where is this history?
0:26 Where are the alternate copies of the file?
0:28 That's because by default git hides its working copy how it manages that.
0:33 So if you actually hit shift command dot on Mac.
0:37 Os that will show the hidden files in the finder and you see this .git
0:43 file here folder and in the .git folder there's all the copies and versions and
0:48 everything and I'm not gonna go too deep into it.
0:51 I'll show you some resources to understand this better if you really want to dive into
0:54 it. But this folder is the top level indicator of our GIT repository.
1:00 If you see this .git file,
1:03 that means that folder is the root of some kind of git repository And in here
1:08 that's where all the tracking and management goes.
1:11 The only reason you really care about this is one to know to not delete it
1:15 or throw it away. And two,
1:17 if you're going to make a copy of this project and you want to take the
1:21 git repository history with it, be sure to copy the hidden contents,
1:26 not just the three files there as well.
1:29 If you're on Windows and you want to see the same thing and you're in Windows
1:32 Explorer, you can just go to view options and say show hidden items.
1:36 You should get the same deal.
1:37 Now. If you do want to understand that way better than most people,
1:41 you can check out this talk python to me podcast episode I did with Rob Richardson
1:46 he did a great talk on understanding the internal workings of the .git folder
1:53 and all the stuff that's happening down there.
1:54 So he and I sat around and chatted for about an hour about what's happening in
1:58 there and all the cool things that that .git folder does.
2:02 So if you want to dive into it,
2:03 you know, check out this episode,
2:04 but it's certainly not required to work with git.