Back to lessons

Staging & Committing

Master the art of staging changes and creating meaningful commits.

Step 1 of 813%

Git has a three-step workflow: working directory → staging area → commit. First you make changes, then you stage them, and finally you commit.

This three-step workflow is one of Git's most powerful features. Unlike simpler systems that go straight from edit to save, Git's staging area acts as a buffer — you can selectively stage only certain changes, review what you're about to commit, and even stage different parts of the same file. This gives you precise control over your commit history.
1 / 8