Git Version Control & Collaboration
14 mins read
Free Lesson
Understand the Working Directory, Staging Area (Index), and Git Repository with git init, add, and commit.
The Three Trees of Git
Working Directory ---> [git add] ---> Staging Area (Index) ---> [git commit] ---> Git Repository (HEAD)
Everyday Commands:
# Initialize a repository
git init
# Check working tree status
git status
# Stage changes
git add .
# Commit with descriptive message
git commit -m "feat: initialize authentication scaffolding"