Lesson 3 of 8
git add & git commit
Saving work in Git is a two-step process. First, stage changes with git add. Then, save them with git commit. A commit is a snapshot of your project at a specific point in time.
Always write a clear commit message describing what you changed.
GIT
# Stage a specific file
git add index.html
# Stage all changes
git add .
# Save the staged changes with a message
git commit -m "Add navigation menu"
# Stage and commit in one command (only for tracked files)
git commit -a -m "Fix typo in footer"