From the course: Complete Guide to Git

Unlock this course with a free trial

Join today to access over 25,900 courses taught by industry experts.

The three trees

The three trees

- [Narrator] In this movie, I want to discuss Git's three tree architecture. This is a key concept that will help you to better understand how Git works. A tree is a general computer science term for a hierarchical data structure. The hierarchy of elements looks a lot like the branches of a tree. The file system on your operating system is a tree. Inside a documents directory, you might have several sub directories, which also contain more sub directories and files. You can see from this illustration how it looks like the branches of a tree turned on its side. Git has a three tree architecture. One tree is your project directory. That's the hierarchy of files and sub directories that you're working with. You can think of it as your project. We call it your working directory. Another tree is the Git repository, which also holds a set of the project files also arranged as a tree. These two trees might be identical and have identical files, but imagine that we make some edits to the…

Contents