Aicloud E-Learning

Guided Notes

Introduction to Git

Commits, the staging area, and history.

Git tracks changes to files over time as a series of commits — each one a snapshot, with a message describing what changed and why.

Before a commit, changes go through a staging area: `git add` selects which changes to include, `git commit` saves the snapshot. This two-step process lets you commit only part of your work at a time.

Because every commit is saved permanently, Git lets you go back to any previous state, see exactly what changed and when, and collaborate with others without overwriting each other's work.