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, your source files and other resources that go along with it like images,
0:09 but it has everything that has ever happened to them. You might wonder how does that happen. For example, if I clone a project here called project,
0:18 it has three files, file 1,2 and 3.py and it looks like there's nothing else here. So where is this history?
0:27 Where are the alternate copies of the file? That's because by default git hides its working copy how it manages that.
0:34 So if you actually hit shift command dot on Mac. Os that will show the hidden files in the finder and you see this .git
0:44 file here folder and in the .git folder there's all the copies and versions and everything and I'm not gonna go too deep into it.
0:52 I'll show you some resources to understand this better if you really want to dive into
0:55 it. But this folder is the top level indicator of our GIT repository. If you see this .git file,
1:04 that means that folder is the root of some kind of git repository And in here that's where all the tracking and management goes.
1:12 The only reason you really care about this is one to know to not delete it or throw it away. And two,
1:18 if you're going to make a copy of this project and you want to take the git repository history with it, be sure to copy the hidden contents,
1:27 not just the three files there as well. If you're on Windows and you want to see the same thing and you're in Windows
1:33 Explorer, you can just go to view options and say show hidden items. You should get the same deal.
1:38 Now. If you do want to understand that way better than most people, you can check out this talk Python to me podcast episode I did with Rob Richardson
1:47 he did a great talk on understanding the internal workings of the .git folder and all the stuff that's happening down there.
1:55 So he and I sat around and chatted for about an hour about what's happening in there and all the cool things that that .git folder does.
2:03 So if you want to dive into it, you know, check out this episode, but it's certainly not required to work with git.

Talk Python's Mastodon Michael Kennedy's Mastodon