Services Work Learn About Contact
0/8
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"
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed Git & GitHub!

You finished all 8 lessons and quizzes. You now know the basics of Git & GitHub.