Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m

1.2 Git Basics: The Three Trees

In this lesson, I’ll explain Git’s three trees. You’ll see the role of each and how they interact as code is updated and committed.

  • The working directory is where new changes are made to the codebase. You can edit, create and delete files directly in the working directory.
  • The index is where changes are staged. Files are added to the index, where they are prepared for packaging in a commit object.
  • The HEAD is a pointer to a specific branch and commit in the repository. Files are checked out from the HEAD to the working directory and are committed from the index to the branch pointed to by HEAD.

Related Links

1.Git Basics: The Three Trees
2 lessons, 05:28

Free Lesson
1.1
Introduction
00:28

1.2
Git Basics: The Three Trees
05:00