Git Add — Free Git & GitHub Tutorial
Learn Git Add in Git & GitHub with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
TL;DR: Learn Git Add in Git & GitHub with a free, beginner-friendly tutorial, examples and practice for Indian students on Syllab.in.
Written & reviewed by the Syllab.in Academic Team (CBSE/NCERT subject experts) · Updated
Git Add in Git & GitHub
`git add` stages files — it tells Git "I want to include these changes in my next commit." Staging is the step between making changes and committing them. It's like putting items in a shopping cart before checkout.
You can stage files one by one (`git add file.txt`) or all at once (`git add .`). Staging lets you be selective about what you commit — maybe you changed file1.txt and file2.txt, but only want to commit file1.txt right now.
Priya creates a README.md file and stages it. Later, Arjun modifies the CSS file and stages that too. They control what goes into each commit.
Git Add — Syntax
git add <file> # Stage one file git add . # Stage all changes git add *.js # Stage all .js files
Learn Git Add step by step with Syllab's free interactive Git & GitHub tutorial — runnable code examples, practice exercises and instant AI feedback, all free with no signup. Explore the full Git & GitHub course →