Mid From PDF Version Control Git & GitHub

Explain the difference between git add and git commit.

Short answer: git add: This command stages changes, telling Git which modifications you want to include in the next commit.

Explain a bit more

It doesn't save the changes to the repository yet, just prepares them. git commit: This actually saves the changes to the repository, creating a new entry in your project’s history. Real-World Example: You’ve edited a few files in your project. First, you use git add . to stage all changes, and then you use git commit -m "Fixed bug in homepage" to save those changes to the repository.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details