Junior From PDF Version Control Git & GitHub

What is .gitignore and how is it used?

Short answer: The .gitignore file tells Git which files or directories it should ignore when tracking changes.

Explain a bit more

This is useful for files that aren’t necessary in the repository, like log files, compiled binaries, or local configuration files. Real-World Example: If you're working on a Node.js project, you likely don’t want to track the node_modules/ directory, since it can be recreated by running npm install. You can add node_modules/ to your .gitignore file to ensure that Git doesn't track those files.

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