Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 451–475 of 963

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is a Git tag, and how do you use it for releases?

Short answer: A Git tag marks specific points in a repository’s history — usually to label release versions (like v1.0, v2.1, etc.). Explain a bit more It’s like a snapshot that says, “this commit is stable and ready to…

Version Control Read answer
Junior PDF
What is a branch in Git, and why are branches useful?

Short answer: A branch in Git is like a separate line of development — a parallel universe for your code. It allows you to work on new features, bug fixes, or experiments without affecting the main codebase (usually call…

Version Control Read answer
Junior PDF
What is Git, and how does it differ from other version control systems like SVN?

Short answer: Git is a distributed version control system (VCS) that allows multiple developers to work on a project without overwriting each other's work. Explain a bit more It's designed to be fast, flexible, and scala…

Version Control Read answer
Junior PDF
What is Git?

Short answer: A distributed version control system (DVCS) for tracking changes in source code during software development. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broke…

Version Control Read answer
Junior PDF
Steps Defined by Subclasses:?

Short answer: Subclasses, like PastaRecipe, implement the GatherIngredients, Prepare, and CookMethod methods. These methods contain the specific details of the recipe, such as the ingredients, preparation steps, and cook…

GoF Patterns Read answer
Junior PDF
Builder Interface (IPizzaBuilder): ○ The IPizzaBuilder interface defines the steps for constructing a pizza. It includes methods for setting the dough, sauce, and adding toppings, as well

Short answer: s a Build() method to return the fully constructed pizza. public interface IPizzaBuilder { void SetDough(string dough); void SetSauce(string sauce); void AddTopping(string topping); Pizza Build(); } s a Bui…

GoF Patterns Read answer
Junior PDF
What is the difference between git revert and git reset?

Short answer: Comman Description Safe for shared repos? git revert Creates a new commit that undoes changes from a previous commit ✅ Yes git reset Moves the branch pointer back to a previous commit, potentially removing…

Version Control Read answer
Junior PDF
What is a Pull Request (PR)?

Short answer: A Pull Request is a request to merge your changes from one branch or fork into another repository or branch — typically to propose new code, bug fixes, or improvements. Example: You fixed a typo or added a…

Version Control Read answer
Junior PDF
What is a commit in Git?

Short answer: A commit in Git is a snapshot of your project at a specific point in time. Explain a bit more It records all the changes you've made to the files and saves them to the repository. Every commit has a unique…

Version Control Read answer
Junior PDF
What is git stash, and when would you use it?

Short answer: git stash temporarily saves your uncommitted changes so you can work on something else without committing unfinished work. Example: You’re fixing a login bug but suddenly need to switch branches to fix a pr…

Version Control Read answer
Junior PDF
What is git stash, and when would you use it? Follow:

Short answer: git stash temporarily saves your uncommitted changes so you can work on something else without committing unfinished work. Example: You’re fixing a login bug but suddenly need to switch branches to fix a pr…

Version Control Read answer
Junior PDF
What is the difference between git pull and git fetch?

Short answer: git fetch: It retrieves changes from a remote repository but does not apply them to your working directory. Explain a bit more You can think of it as checking for updates without actually installing them. g…

Version Control Read answer
Junior PDF
What is a commit?

Short answer: time, including changes and a message. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one clear sentence (t…

Version Control Read answer
Junior PDF
What is a commit?

Short answer: (Duplicate of #4) A snapshot of your project at a specific point in time, including changes and a message. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead…

Version Control Read answer
Junior PDF
What is a branch?

Short answer: A lightweight, movable pointer to a commit, allowing for parallel development. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR to main ; resolve conflic…

Version Control Read answer
Junior PDF
What is GitHub Flow vs Git Flow?

Short answer: Aspect GitHub Flow Git Flow Purpose Simple branching model for continuous delivery Structured model for release management Branche Only main and short-lived feature branches Multiple: main, develop, feature…

Version Control Read answer
Junior PDF
What is a “detached HEAD” and how can you recover from it?

Short answer: A detached HEAD happens when Git’s HEAD (your current position) points to a specific commit instead of a branch. Explain a bit more If you make new commits in this state, they won’t belong to any branch — y…

Version Control Read answer
Junior PDF
What is a detached HEAD state in Git?

Short answer: A detached HEAD occurs when Git’s HEAD (which points to your current branch) points to a specific commit instead of a branch. Explain a bit more This means you’re not working on any branch — any new commits…

Version Control Read answer
Junior PDF
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…

Version Control Read answer
Junior PDF
GitHub Actions?

Short answer: to build, test, and deploy code directly from GitHub. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say this in…

Version Control Read answer
Junior PDF
What is origin?

Short answer: The default name for the remote repository from which a project was originally cloned. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach p…

Version Control Read answer
Junior PDF
What is HEAD?

Short answer: A pointer to the current commit you are on in your local repository. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnotice…

Version Control Read answer
Junior PDF
What is .gitconfig?

Short answer: A configuration file that stores user-specific Git settings (e.g., username, email, aliases). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to a project…

Version Control Read answer
Junior PDF
What is git diff --cached?

Short answer: Shows changes between the staging area and the last commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say th…

Version Control Read answer
Junior PDF
What is git log?

Short answer: Displays the commit history of the current branch. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say this in the…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

Short answer: A Git tag marks specific points in a repository’s history — usually to label release versions (like v1.0, v2.1, etc.).

Explain a bit more

It’s like a snapshot that says, “this commit is stable and ready to release.” Types of tags: Lightweight tag: just a name for a commit. Annotated tag: includes metadata like the tagger’s name, date, and message. Commands: git tag -a v1.0 -m "Version 1.0 release" git push origin v1.0 Real-world example: After testing your project, you tag the commit representing your first release with v1.0. This helps other developers or CI/CD pipelines identify which version is live.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A branch in Git is like a separate line of development — a parallel universe for your code. It allows you to work on new features, bug fixes, or experiments without affecting the main codebase (usually called the main or master branch). Why branches are useful: They make collaboration easier by keeping each developer’s work isolated until it’s ready to be merged back. Real-world

Example code

Imagine your company website is live, but you need to add a “dark mode” feature. Instead of editing the main code directly (which might break the live site), you create a new branch called feature/dark-mode to work independently. Once it’s done and tested, you merge it back into main.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Git is a distributed version control system (VCS) that allows multiple developers to work on a project without overwriting each other's work.

Explain a bit more

It's designed to be fast, flexible, and scalable, allowing developers to track changes in code and collaborate with ease. In contrast, SVN (Subversion) is a centralized version control system. This means that SVN has one central repository, and developers check out code to work locally. Git, on the other hand, allows every developer to have their own full local repository, including the project’s history. This makes Git faster and more reliable, especially in distributed teams. Real-World Example: If you were working on a website project with a team, using Git allows each developer to clone the repository, make changes locally, and push their changes without disrupting others. In SVN, the code is pulled from the central server, and only one developer can commit changes at a time.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A distributed version control system (DVCS) for tracking changes in source code during software development.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Gang of Four Patterns Design Patterns in C# · GoF Patterns

Short answer: Subclasses, like PastaRecipe, implement the GatherIngredients, Prepare, and CookMethod methods. These methods contain the specific details of the recipe, such as the ingredients, preparation steps, and cooking process.

Real-world example (ShopNest)

Use a GoF pattern in ShopNest only when it removes duplication or makes a change safer—explain the problem it solves in the interview.

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.
Permalink & share

Gang of Four Patterns Design Patterns in C# · GoF Patterns

Short answer: s a Build() method to return the fully constructed pizza. public interface IPizzaBuilder { void SetDough(string dough); void SetSauce(string sauce); void AddTopping(string topping); Pizza Build(); } s a Build() method to return the fully constructed pizza.

Real-world example (ShopNest)

Use a GoF pattern in ShopNest only when it removes duplication or makes a change safer—explain the problem it solves in the interview.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Comman Description Safe for shared repos? git revert Creates a new commit that undoes changes from a previous commit ✅ Yes git reset Moves the branch pointer back to a previous commit, potentially removing commits ❌ No (rewrites history)

Example code

If you realize a commit caused an error: git revert will make a new commit that undoes it. git reset will erase it as if it never happened (good for local cleanup).

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A Pull Request is a request to merge your changes from one branch or fork into another repository or branch — typically to propose new code, bug fixes, or improvements. Example: You fixed a typo or added a feature in your fork of a project. You create a PR asking the original maintainers to “pull” your changes into their main branch. PRs enable: Code review Automated testing Discussion before merging

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A commit in Git is a snapshot of your project at a specific point in time.

Explain a bit more

It records all the changes you've made to the files and saves them to the repository. Every commit has a unique ID, and it's like a save point in a video game—if something breaks, you can go back to any commit. Real-World Example: Let’s say you fixed a bug on the homepage of your app. After completing the fix, you commit the changes to the repository. Later, if the fix causes an issue, you can roll back to the previous commit.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git stash temporarily saves your uncommitted changes so you can work on something else without committing unfinished work. Example: You’re fixing a login bug but suddenly need to switch branches to fix a production issue. Instead of committing half-done code, you run: git stash git checkout main Later, you can come back and reapply your stashed work.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git stash temporarily saves your uncommitted changes so you can work on something else without committing unfinished work. Example: You’re fixing a login bug but suddenly need to switch branches to fix a production issue. Instead of committing half-done code, you run: git stash git checkout main Later, you can come back and reapply your stashed work.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: git fetch: It retrieves changes from a remote repository but does not apply them to your working directory.

Explain a bit more

You can think of it as checking for updates without actually installing them. git pull: This does two things: it fetches the latest changes and then merges them into your current branch. It's like fetching updates and immediately applying them. Real-World Example: If you're working on a project with teammates, git fetch allows you to see what changes have been made without affecting your code. git pull, on the other hand, will update your local copy and merge those changes with your work, which can sometimes result in merge conflicts.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: time, including changes and a message.

Real-world example (ShopNest)

Prefer clear commits: fix(cart): prevent negative quantities instead of update.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: (Duplicate of #4) A snapshot of your project at a specific point in time, including changes and a message.

Real-world example (ShopNest)

Prefer clear commits: fix(cart): prevent negative quantities instead of update.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A lightweight, movable pointer to a commit, allowing for parallel development.

Real-world example (ShopNest)

Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Aspect GitHub Flow Git Flow Purpose Simple branching model for continuous delivery Structured model for release management Branche Only main and short-lived feature branches Multiple: main, develop, feature, release, hotfix Workflow Create branch → Commit → Pull Request → Merge → Deploy Feature branches merge into develop, then release/hotfix merges into main Use Case SaaS projects, frequent deploys Complex products…

Example code

GitHub Flow → Used by startups deploying updates daily. Git Flow → Used by large software teams (e.g., enterprise apps) with versioned releases.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A detached HEAD happens when Git’s HEAD (your current position) points to a specific commit instead of a branch.

Explain a bit more

If you make new commits in this state, they won’t belong to any branch — you could lose them if you switch branches. How to fix it: If you accidentally commit in a detached HEAD state: git switch -c temp-branch This creates a new branch from your current state so your commits aren’t lost. Example: You checked out an old commit to test something: git checkout a1b2c3d If you make changes, create a branch to save them before switching back.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A detached HEAD occurs when Git’s HEAD (which points to your current branch) points to a specific commit instead of a branch.

Explain a bit more

This means you’re not working on any branch — any new commits made in this state are “orphaned” unless you create a branch from them. Example: If you check out an old commit directly: git checkout a1b2c3d You’re in a detached HEAD state. If you make changes here and don’t create a new branch, you could lose them later. Fix: Create a new branch to save your work: git checkout -b hotfix/rollback-test

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: to build, test, and deploy code directly from GitHub.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: The default name for the remote repository from which a project was originally cloned.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A pointer to the current commit you are on in your local repository.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: A configuration file that stores user-specific Git settings (e.g., username, email, aliases).

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Shows changes between the staging area and the last commit.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share

Git & GitHub Developer Essentials · Version Control

Short answer: Displays the commit history of the current branch.

Real-world example (ShopNest)

ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.

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.
Permalink & share
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