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 2151–2175 of 4608

Career & HR topics

By tech stack

Popular tracks

Mid PDF
How do you squash commits in a PR before merging?

Short answer: Squashing combines multiple small commits into one clean commit before merging — keeping history tidy. Explain a bit more Options: On GitHub: When merging a PR, select “Squash and merge.” On local machine:…

Version Control Read answer
Mid PDF
How do you rewrite commit history? (e.g., git rebase -i)

Short answer: You can interactively rebase to edit, squash, or reorder commits using: git rebase -i HEAD~3 This opens an editor showing the last 3 commits: pick 1a2b3c Fix typo in footer pick 4d5e6f Add login API pick 7g…

Version Control Read answer
Mid PDF
Explain what happens internally when you merge two branches.?

Short answer: When you run a merge, Git: 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 Define —…

Version Control Read answer
Mid PDF
How do you view commit history in Git?

Short answer: You can view the commit history by using the command: git log This shows a list of commits, with each commit’s hash, author, date, and message. Real-World Example: Imagine you're trying to figure out when a…

Version Control Read answer
Mid PDF
Conflict resolution?

Short answer: Manually editing files to combine conflicting changes, then staging and committing them. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR to main ; resol…

Version Control Read answer
Mid PDF
Git rebase?

Short answer: base commit, creating a linear history. 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 interv…

Version Control Read answer
Mid PDF
Git rebase?

Short answer: Rewrites commit history by moving a sequence of commits to a new base commit, creating a linear history. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR…

Version Control Read answer
Mid PDF
Git fetch?

Short answer: local repository, but doesn't merge them. 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 intervie…

Version Control Read answer
Mid PDF
Git fetch?

Short answer: Downloads commits, files, and refs from a remote repository into your local repository, but doesn't merge them. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so br…

Version Control Read answer
Mid PDF
Add remote?

Short answer: git remote add <name> <url> - links a local repository to a remote one (e.g., GitHub). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to a pr…

Version Control Read answer
Mid PDF
Git clone?

Short answer: git clone <url> - creates a local copy of a remote 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
Mid PDF
Git ignore?

Short answer: intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. i…

Version Control Read answer
Mid PDF
Git ignore?

Short answer: A file (.gitignore) that tells Git which files or directories to intentionally ignore from being tracked. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken b…

Version Control Read answer
Mid PDF
View changes?

Short answer: git status (summary), git diff (detailed changes). 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
Mid PDF
Undo changes?

Short answer: git reset HEAD <file> (unstage). 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 D…

Version Control Read answer
Mid PDF
Undo changes?

Short answer: git restore <file> (unstage/discard working dir changes), git reset HEAD <file> (unstage). Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken buil…

Version Control Read answer
Mid PDF
Undo changes?

Short answer: working dir changes), git reset HEAD <file> (unstage). Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say t…

Version Control Read answer
Mid PDF
Git reset?

Short answer: And optionally changes the staging area/working directory to a specified commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach product…

Version Control Read answer
Mid PDF
Git reset?

Short answer: git reset --soft/--mixed/--hard <commit> - moves HEAD and optionally changes the staging area/working directory to a specified commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs wit…

Version Control Read answer
Mid PDF
Git revert?

Short answer: changes of a previous commit, preserving history. 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
Mid PDF
Git revert?

Short answer: git revert <commit> - creates a new commit that undoes the changes of a previous commit, preserving history. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so…

Version Control Read answer
Mid PDF
Git file-revert?

Short answer: git checkout <commit> -- <file> - restores a file to its state at a specific commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds nev…

Version Control Read answer
Mid PDF
reset vs revert?

Short answer: reset rewrites history; revert creates a new commit to undo changes, preserving history. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach…

Version Control Read answer
Mid PDF
Git reflog?

Short answer: Shows a log of where your HEAD and branch tips have been, useful for recovering lost commits. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never…

Version Control Read answer
Mid PDF
Git cherry-pick?

Short answer: by an existing commit from another branch onto your current branch. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

Short answer: Squashing combines multiple small commits into one clean commit before merging — keeping history tidy.

Explain a bit more

Options: On GitHub: When merging a PR, select “Squash and merge.” On local machine: git rebase -i HEAD~3 Change extra commits from pick → squash and then push with: git push -f Real-world example: If your PR has 10 commits like “fix typo,” “oops forgot semicolon,” and “final fix,” you squash them into one commit: 👉 Add responsive navbar component ✅ Pro Tip: A clean workflow often looks like this:

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: You can interactively rebase to edit, squash, or reorder commits using: git rebase -i HEAD~3 This opens an editor showing the last 3 commits: pick 1a2b3c Fix typo in footer pick 4d5e6f Add login API pick 7g8h9i Update UI color scheme You can change: pick → edit to modify a commit pick → squash to combine commits pick → reword to change the… message……… Real-world example: Before merging your feature branch, you may…

Explain a bit more

use git rebase -i to combine small “fix typo” or “debug print” commits into a clean, single commit. ⚠ Don’t rewrite history on shared branches that others are using — it can cause conflicts and confusion. GitHub & Remote Repository Management

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: When you run a merge, Git:

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: You can view the commit history by using the command: git log This shows a list of commits, with each commit’s hash, author, date, and message. Real-World Example: Imagine you're trying to figure out when a bug was introduced to your code. By running git log, you can see all previous commits, helping you pinpoint the changes that might have caused the issue. Branching & Merging

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: Manually editing files to combine conflicting changes, then staging and committing them.

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: base commit, creating a linear history.

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: Rewrites commit history by moving a sequence of commits to a new base commit, creating a linear history.

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: local repository, but doesn't merge them.

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: Downloads commits, files, and refs from a remote repository into your local repository, but doesn't merge them.

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 remote add <name> <url> - links a local repository to a remote one (e.g., GitHub).

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 clone <url> - creates a local copy of a remote 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: intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked.

Example code

intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked.

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 file (.gitignore) that tells Git which files or directories to intentionally ignore from being tracked.

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 status (summary), git diff (detailed changes).

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 reset HEAD <file> (unstage).

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 restore <file> (unstage/discard working dir changes), git reset HEAD <file> (unstage).

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: working dir changes), git reset HEAD <file> (unstage).

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: And optionally changes the staging area/working directory to a specified 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: git reset --soft/--mixed/--hard <commit> - moves HEAD and optionally changes the staging area/working directory to a specified 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: changes of a previous commit, preserving history.

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 revert <commit> - creates a new commit that undoes the changes of a previous commit, preserving history.

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 checkout <commit> -- <file> - restores a file to its state at a specific 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: reset rewrites history; revert creates a new commit to undo changes, preserving history.

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: Shows a log of where your HEAD and branch tips have been, useful for recovering lost commits.

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: by an existing commit from another branch onto your 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