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 1501–1525 of 3281

Career & HR topics

By tech stack

Popular tracks

Mid PDF
Create a new branch from that commit:?

Short answer: git checkout -b feature/login abc1234 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 intervie…

Version Control Read answer
Mid PDF
Immediately revoke or rotate the secret (e.g., from AWS, GitHub, Stripe?

Short answer: dashboard). → This prevents misuse. Remove the secret from code: git rm --cached path/to/file git commit -m "Remove sensitive file" Real-world example (ShopNest) ShopNest’s team uses GitHub PRs wi…

Version Control Read answer
Mid PDF
You accidentally committed secrets to GitHub. What steps do you take?

Short answer: Accidentally pushing secrets (API keys, passwords, tokens) is serious — even if you delete them, they may still exist in commit history. Steps to fix it: Real-world example (ShopNest) Prefer clear commits:…

Version Control Read answer
Mid PDF
Merge or rebase the target branch (e.g., main) into your branch:?

Short answer: git merge origin/main 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 — one c…

Version Control Read answer
Mid PDF
How do you link a local repository to a remote one?

Short answer: After initializing a Git repo locally (git init), you can connect it to a remote repository (like one on GitHub) using: git remote add origin Then push your code: git push -u origin main Explanation: origin…

Version Control Read answer
Mid PDF
Stop the merge/rebase process.?

Short answer: Mark the conflicting sections in your file: <<<<<<< HEAD your current branch code ======= incoming branch code >>>>>>> feature/new-ui Real-world example (ShopNest)…

Version Control Read answer
Mid PDF
Git will stop and mark conflicts in the affected files like this:?

Short answer: <<<<<<< HEAD current branch code ======= incoming branch code >>>>>>> feature/contact-form Real-world example (ShopNest) Feature work for “UPI payment” lives on fea…

Version Control Read answer
Mid PDF
Go back and remove them from the wrong branch (if needed):?

Short answer: git checkout wrong-branch git reset --hard HEAD~2 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
Explain the difference between origin and upstream.

Short answer: origin – The main remote repository you cloned or own. upstream – Usually refers to the original repository that your fork came from. Example code If you fork a popular open-source project: Your fork on Git…

Version Control Read answer
Mid PDF
Explain the difference between Git and GitHub.

Short answer: Git is the tool used to track changes in your code locally (on your computer), whereas GitHub is a platform that hosts Git repositories online, enabling collaboration and sharing. Explain a bit more GitHub…

Version Control Read answer
Mid PDF
DVCS explained?

Short answer: including its entire history, allowing for offline work and decentralized collaboration. 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
Use fine-grained permissions?

Short answer: GitHub Actions tokens (GITHUB_TOKEN) should have minimal scopes: permissions: contents: read deployments: write packages: read Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and…

Version Control Read answer
Mid PDF
Commit with signature:?

Short answer: git commit -S -m "fix: secure login flow" Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one clea…

Version Control Read answer
Mid PDF
How do you automate semantic versioning and changelog generation using Git tags?

Short answer: Semantic Versioning (SemVer) follows the format: MAJOR.MINOR.PATCH Example code v2.3.1 It’s based on changes — breaking changes bump MAJOR, new features bump MINOR, and bug fixes bump PATCH. Automation tool…

Version Control Read answer
Mid PDF
Verify commit history.?

Short answer: Clean and optimize the repository: git gc --aggressive Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one c…

Version Control Read answer
Mid PDF
Add and continue:?

Short answer: git add . git merge --continue # or git rebase --continue Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say this…

Version Control Read answer
Mid PDF
This creates a new branch from that commit and keeps your work safe.?

Short answer: Example: You checked out an old commit for debugging: git checkout a1b2c3d Then made edits and committed — but forgot to make a new branch. Create one before switching back, or you’ll lose that work. Real-w…

Version Control Read answer
Mid PDF
Identify the commit before the force push.?

Short answer: Create a branch to restore it: git checkout -b recovery-branch <commit-hash> Example code Create a branch to restore it: git checkout -b recovery-branch <commit-hash> Real-world example (ShopNes…

Version Control Read answer
Mid PDF
How do you recover a deleted branch?

Short answer: If you deleted a branch accidentally but haven’t run garbage collection yet, it can be recovered using the commit log. Steps: Find the last commit of that branch: git reflog Example output: abc1234 refs/hea…

Version Control Read answer
Mid PDF
Resolve conflicts manually — look for markers like:?

Short answer: <<<<<<< HEAD Your changes ======= Incoming changes >>>>>>> main Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a P…

Version Control Read answer
Mid PDF
How do you handle large binary files in Git?

Short answer: Large binary files (like images, videos, or data models) bloat Git repositories since Git stores every version. Explain a bit more To handle them efficiently, I use Git LFS (Large File Storage). Setup: git…

Version Control Read answer
Mid PDF
How do you undo a commit that has already been pushed?

Short answer: If a commit has been pushed to a shared branch, the safest way is to revert it — not remove it. Explain a bit more git revert <commit-hash> This creates a new commit that undoes the changes from the o…

Version Control Read answer
Mid PDF
How do you create and switch to a new branch?

Short answer: You can create and switch to a new branch using: git checkout -b feature/login-page This creates a branch named feature/login-page and switches you to it immediately. Explain a bit more Alternatively, you c…

Version Control Read answer
Mid PDF
DVCS explained?

Short answer: A system where every developer has a full copy of the repository, including its entire history, allowing for offline work and decentralized collaboration. Real-world example (ShopNest) ShopNest’s team uses…

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

Short answer: (Working Directory, Staging Area, Repository) Working Directory: This is where you make changes to the files. Explain a bit more It's your local workspace where you're actively editing code. Staging Area (I…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

Short answer: git checkout -b feature/login abc1234

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: dashboard). → This prevents misuse. Remove the secret from code: git rm --cached path/to/file git commit -m "Remove sensitive file"

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: Accidentally pushing secrets (API keys, passwords, tokens) is serious — even if you delete them, they may still exist in commit history. Steps to fix it:

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 merge origin/main

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: After initializing a Git repo locally (git init), you can connect it to a remote repository (like one on GitHub) using: git remote add origin Then push your code: git push -u origin main Explanation: origin is just a nickname for the remote URL.

Explain a bit more

The -u flag links your local branch with the remote one so future pushes are easier (git push alone works after that). Real-world example: You create a local portfolio website and later decide to host it on GitHub. You connect your local repo to the remote one using git remote add origin so both stay in sync.

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 the conflicting sections in your file: <<<<<<< HEAD your current branch code ======= incoming branch code >>>>>>> feature/new-ui

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: <<<<<<< HEAD current branch code ======= incoming branch code >>>>>>> feature/contact-form

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: git checkout wrong-branch git reset --hard HEAD~2

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: origin – The main remote repository you cloned or own. upstream – Usually refers to the original repository that your fork came from.

Example code

If you fork a popular open-source project: Your fork on GitHub = origin The original repo (the one you forked from) = upstream Commands to set both: git remote add origin git remote add upstream Why it matters: This setup lets you pull new changes from the main project (upstream) while pushing your changes to your fork (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: Git is the tool used to track changes in your code locally (on your computer), whereas GitHub is a platform that hosts Git repositories online, enabling collaboration and sharing.

Explain a bit more

GitHub allows teams to work on Git-based projects in a central location, review code, and manage issues and pull requests. Real-World Example: You use Git to make changes to your website’s code locally. Once you're happy with your changes, you push them to GitHub so your team can see and review the updates. GitHub is essentially a cloud service that works on top of Git.

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: including its entire history, allowing for offline work and decentralized collaboration.

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: GitHub Actions tokens (GITHUB_TOKEN) should have minimal scopes: permissions: contents: read deployments: write packages: read

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 commit -S -m "fix: secure login flow"

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: Semantic Versioning (SemVer) follows the format: MAJOR.MINOR.PATCH

Example code

v2.3.1 It’s based on changes — breaking changes bump MAJOR, new features bump MINOR, and bug fixes bump PATCH. Automation tools: semantic-release (Node.js) GitVersion (for .NET) release-please (Google’s tool for GitHub Actions) Example using semantic-release: npm install semantic-release @semantic-release/git @semantic-release/github -D Create a .releaserc.json: { "branches": ["main"], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/changelog", "@semantic-release/github", "@semantic-release/git" } What it does: Reads commit messages (feat:, fix:, breaking:) Calculates next version automatically Creates a Git tag (e.g., v1.2.0) Updates CHANGELOG.md Publishes release notes to GitHub Example output: chore(release): 1.3.0 feat: add dark mode toggle fix: resolve login error

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: Clean and optimize the repository: git gc --aggressive

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 add . git merge --continue # or git rebase --continue

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: Example: You checked out an old commit for debugging: git checkout a1b2c3d Then made edits and committed — but forgot to make a new branch. Create one before switching back, or you’ll lose that work.

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: Create a branch to restore it: git checkout -b recovery-branch <commit-hash>

Example code

Create a branch to restore it: git checkout -b recovery-branch <commit-hash>

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: If you deleted a branch accidentally but haven’t run garbage collection yet, it can be recovered using the commit log. Steps: Find the last commit of that branch: git reflog Example output: abc1234 refs/heads/feature/login: commit: Add login validation

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: <<<<<<< HEAD Your changes ======= Incoming changes >>>>>>> main

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: Large binary files (like images, videos, or data models) bloat Git repositories since Git stores every version.

Explain a bit more

To handle them efficiently, I use Git LFS (Large File Storage). Setup: git lfs install git lfs track "*.psd" git add .gitattributes git commit -m "Track Photoshop files with Git LFS" Explanation: Git LFS replaces large files with lightweight text pointers inside Git, while the actual binary files are stored on a separate LFS server. Example: If a game project has large texture files, Git LFS prevents the repo from becoming gigabytes in size, improving clone and fetch performance.

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: If a commit has been pushed to a shared branch, the safest way is to revert it — not remove it.

Explain a bit more

git revert <commit-hash> This creates a new commit that undoes the changes from the old one, without rewriting history. Example: If you pushed a buggy commit that broke the login page, git revert creates a new commit that removes those buggy changes while keeping the history intact. ⚠ Avoid git reset on shared branches because it rewrites history — it can mess up others’ work.

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: You can create and switch to a new branch using: git checkout -b feature/login-page This creates a branch named feature/login-page and switches you to it immediately.

Explain a bit more

Alternatively, you can do it in two steps: git branch feature/login-page git checkout feature/login-page Real-world example: If your team assigns you to build a login page, you can create a branch feature/login-page to isolate your changes from the main code.

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 system where every developer has a full copy of the repository, including its entire history, allowing for offline work and decentralized collaboration.

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, Staging Area, Repository) Working Directory: This is where you make changes to the files.

Explain a bit more

It's your local workspace where you're actively editing code. Staging Area (Index): This is like a holding area where you prepare files before committing them to the repository. You can choose which changes to add here. Repository: This is where Git stores the project’s history (commits). It's the permanent record of your project's evolution. Real-World

Example code

When you're editing code, it starts in the working directory. After editing, you "stage" your changes (using git add), which moves them to the staging area. Once you're ready to save your changes permanently, you commit them to the repository using git 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
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