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 1526–1550 of 3281

Career & HR topics

By tech stack

Popular tracks

Mid PDF
What are signed commits (git commit -S), and why use them?

Short answer: Signed commits ensure authenticity — they’re cryptographically verified with a GPG or SSH key, proving the commit really came from you and wasn’t tampered with. Setup: Generate a GPG key: gpg --full-generat…

Version Control Read answer
Mid PDF
Explain the difference between git merge and git rebase.

Short answer: Both commands integrate changes from one branch into another, but they work differently: git merge combines the histories of two branches, creating a new “merge commit.” git rebase rewrites history by placi…

Version Control Read answer
Mid PDF
What are the key areas of a Git project?

Short answer: rea, Repository) Working Directory: This is where you make changes to the files. It's your local workspace where you're actively editing code. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs w…

Version Control Read answer
Mid PDF
Git file states?

Short answer: next commit), Local Repository (committed files). 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
Never echo secrets in logs?

Short answer: Mask secrets automatically using: run: echo "Deploying..." && echo "${{ secrets.AWS_SECRET_KEY }}" GitHub automatically redacts these values from logs. Real-world example (ShopNe…

Version Control Read answer
Mid PDF
On GitHub:?

Short answer: You’ll see a green “Verified” badge on signed commits. Why it matters: Verifies authorship for open-source contributions. Helps in regulated environments (e.g., fintech, healthcare). Prevents supply chain a…

Version Control Read answer
Mid PDF
What are signed commits (git commit -S), and why use them? Follow:

Short answer: Signed commits ensure authenticity — they’re cryptographically verified with a GPG or SSH key, proving the commit really came from you and wasn’t tampered with. Setup: Generate a GPG key: gpg --full-generat…

Version Control Read answer
Mid PDF
Push to a new Git remote (e.g., GitHub):?

Short answer: git remote add origin git push --all origin git push --tags origin 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
Mid PDF
Delete old branches with redundant history.?

Short answer: Prune and repack: git gc --prune=now --aggressive 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…

Version Control Read answer
Mid PDF
A teammate force-pushed to main and overwrote commits — how do you recover?

Short answer: A force push can rewrite history and make commits disappear from the remote branch — but they’re often recoverable. Steps: Run git reflog locally to view all commit references: git reflog show origin/main R…

Version Control Read answer
Mid PDF
Permanently scrub it from history using:?

Short answer: git filter-repo (preferred) git filter-repo --path path/to/file --invert-paths Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach productio…

Version Control Read answer
Mid PDF
Add and commit resolved files:?

Short answer: git add . git commit git push Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one clear sentence (the short…

Version Control Read answer
Mid PDF
What are submodules in Git, and when would you use them?

Short answer: A Git submodule is a repository inside another repository — useful for including shared components or libraries. Example code You have multiple microservices that share a common authentication library. Inst…

Version Control Read answer
Mid PDF
How do you fork a repository on GitHub?

Short answer: Forking is when you create your own copy of someone else’s GitHub repository. Explain a bit more You do this directly on GitHub by clicking the “Fork” button on the top right of the repository page. Example…

Version Control Read answer
Mid PDF
You manually edit and resolve the conflict.?

Short answer: Add the resolved file: git add <file> git commit # or continue the rebase Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR to main ; resolve confli…

Version Control Read answer
Mid PDF
Manually edit the file to keep the correct code.?

Short answer: Mark conflicts as resolved: git add <filename> git commit Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Sa…

Version Control Read answer
Mid PDF
What are the key areas of a Git project?

Short answer: Working Directory: This is where you make changes to the files. It's your local workspace where you're actively editing code. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and C…

Version Control Read answer
Mid PDF
Git file states?

Short answer: Working Directory (modified files), Staging Area (files marked for next commit), Local Repository (committed files). Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks…

Version Control Read answer
Mid PDF
How do you enforce conventional commits or commitlint rules?

Short answer: Conventional Commits define a standard format for commit messages, such as: feat: add new user registration flow fix: correct login validation chore: update dependencies To enforce this automatically, use c…

Version Control Read answer
Mid PDF
Real-world example: Two developers edit the same line in README.md — one changes “version 1.0” to “1.1,”?

Short answer: nother to “v2.0.” Git will stop and ask you to pick which to keep. 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
Mid PDF
Explain the difference between --soft, --mixed, and --hard resets.

Short answer: Reset Type What It Does Example Scenario -soft Moves HEAD to a previous commit but keeps your changes staged You committed too early and just want to edit the message or add more changes. Explain a bit more…

Version Control Read answer
Mid PDF
Real-world example: If two developers change the same line in index.html (e.g., one changes the header text,?

Short answer: nother changes the same header), Git won’t know which to keep — you decide manually. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach pro…

Version Control Read answer
Mid PDF
Use OpenID Connect (OIDC) for cloud authentication?

Short answer: Instead of long-lived access keys, use federated identity: ■ AWS/GCP trusts GitHub’s identity token. ■ Short-lived credentials are issued dynamically. Example for AWS: permissions: id-token: write contents:…

Version Control Read answer
Mid PDF
How do you enforce conventional commits or commitlint rules? Follow:

Short answer: Conventional Commits define a standard format for commit messages, such as: feat: add new user registration flow fix: correct login validation chore: update dependencies To enforce this automatically, use c…

Version Control Read answer
Mid PDF
Push cleaned repo (force push if needed):?

Short answer: git push origin --force 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 Define — one cle…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

Short answer: Signed commits ensure authenticity — they’re cryptographically verified with a GPG or SSH key, proving the commit really came from you and wasn’t tampered with. Setup: Generate a GPG key: gpg --full-generate-key

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: Both commands integrate changes from one branch into another, but they work differently: git merge combines the histories of two branches, creating a new “merge commit.” git rebase rewrites history by placing your branch’s commits on top of another branch, making it look like you developed your changes sequentially.

Explain a bit more

Real-world analogy: Merge: Like combining two storylines into one — you keep both histories. Rebase: Like rewriting your story so it appears you followed the main storyline all along. Example: If your feature branch has diverged from main, merging will keep both timelines, while rebasing will make it look like your branch was based on the latest main version all along.

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: rea, Repository) Working Directory: This is where you make changes to the files. It's your local workspace where you're actively editing code.

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: next commit), Local Repository (committed files).

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: Mask secrets automatically using: run: echo "Deploying..." && echo "${{ secrets.AWS_SECRET_KEY }}" GitHub automatically redacts these values from logs.

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: You’ll see a green “Verified” badge on signed commits. Why it matters: Verifies authorship for open-source contributions. Helps in regulated environments (e.g., fintech, healthcare). Prevents supply chain attacks via spoofed commits. Real-world example: In a security-conscious org, all commits to the main branch are required to be GPG-signed — GitHub enforces this with branch protection rules.

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: Signed commits ensure authenticity — they’re cryptographically verified with a GPG or SSH key, proving the commit really came from you and wasn’t tampered with. Setup: Generate a GPG key: gpg --full-generate-key

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: git remote add origin git push --all origin git push --tags origin

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: Prune and repack: git gc --prune=now --aggressive

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: A force push can rewrite history and make commits disappear from the remote branch — but they’re often recoverable. Steps: Run git reflog locally to view all commit references: git reflog show origin/main

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: git filter-repo (preferred) git filter-repo --path path/to/file --invert-paths

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 add . git commit git push

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 Git submodule is a repository inside another repository — useful for including shared components or libraries.

Example code

You have multiple microservices that share a common authentication library. Instead of duplicating it, you include it as a submodule: git submodule add libs/auth Pros: Keeps shared code centralized. Cons: Requires careful syncing; new contributors must initialize submodules using: git submodule update --init --recursive

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: Forking is when you create your own copy of someone else’s GitHub repository.

Explain a bit more

You do this directly on GitHub by clicking the “Fork” button on the top right of the repository page. Example: You want to contribute to a public project like freeCodeCamp. You click Fork, creating your own version under your account. You can modify it freely and then make pull requests to the original project. Command-line analogy: Forking is like cloning, but on the GitHub server level — it gives you your own remote repository to push to.

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: Add the resolved file: git add <file> git commit # or continue the rebase

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: Mark conflicts as resolved: git add <filename> git 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: Working Directory: This is where you make changes to the files. It's your local workspace where you're actively editing code.

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 Directory (modified files), Staging Area (files marked for next commit), Local Repository (committed files).

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: Conventional Commits define a standard format for commit messages, such as: feat: add new user registration flow fix: correct login validation chore: update dependencies To enforce this automatically, use commitlint with husky: Setup: npm install --save-dev @commitlint/{config-conventional,cli} husky Create a commitlint.config.js: module.exports = { extends: ['@commitlint/config-conventional'] }; Then add a Git…

Explain a bit more

hook: npx husky install npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' Now every commit is checked — bad messages are rejected. Example: ✅ feat: add password reset feature ❌ Added new password reset → ❌ rejected Why this matters: Enables automatic changelog and versioning. Keeps Git history consistent. Works well with tools like semantic-release.

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: nother to “v2.0.” Git will stop and ask you to pick which to keep.

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 Type What It Does Example Scenario -soft Moves HEAD to a previous commit but keeps your changes staged You committed too early and just want to edit the message or add more changes.

Explain a bit more

-mixed (default) Moves HEAD and unstages files but keeps your changes in the working directory You want to redo your git add selections. -hard Completely resets everything — deletes all local changes You want to discard all work and return to a clean state. Example: git reset --soft HEAD~1 # undo last commit, keep staged git reset --mixed HEAD~1 # undo last commit, unstage files git reset --hard HEAD~1 # undo last commit and delete changes

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: nother changes the same header), Git won’t know which to keep — you decide manually.

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: Instead of long-lived access keys, use federated identity: ■ AWS/GCP trusts GitHub’s identity token. ■ Short-lived credentials are issued dynamically. Example for AWS: permissions: id-token: write contents: read Real-world example: In one project, we replaced static AWS keys with OIDC-based auth in GitHub Actions — no more long-lived tokens, and access was automatically scoped per workflow.

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: Conventional Commits define a standard format for commit messages, such as: feat: add new user registration flow fix: correct login validation chore: update dependencies To enforce this automatically, use commitlint with husky: Setup: npm install --save-dev @commitlint/{config-conventional,cli} husky Create a commitlint.config.js:… module.exports = {……… extends: ['@commitlint/config-conventional'] }; Then add a Git…

Explain a bit more

hook: npx husky install npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' Now every commit is checked — bad messages are rejected.

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: git push origin --force

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