Home › coding › git github › git add

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.

✓ 100% Free ✓ No Login Needed ✓ NCERT / CBSE Aligned ✓ Download as PDF

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 Jul 14, 2026

🤖 Stuck on any question? Ask Syllab's free AI Tutor for a step-by-step explanation — instant, unlimited, no login.

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 →

Explore:

  • Syllabus
  • Practice
  • Mock Tests
  • NCERT Solutions
  • Coding
  • GK Quiz
  • Career Predictor
  • AI Tutor
  • Live Quiz
  • Doubt Solver
  • Microlearning
  • Free Alternatives
  • Kids Zone
  • Study Room
  • Calculators
  • Worksheets

Syllab.in — Free learning for Indian students, Class 1–12