Interview Q&A

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

4616 total questions 4516 technical 100 career & HR 4346 from PDF library

Showing 151–175 of 346

Career & HR topics

By tech stack

Mid PDF
How do you ensure secure handling of access tokens in GitHub

Answer: ctions? Security in CI/CD pipelines is crucial — you never want secrets hard-coded in code or workflows. Best practices: What interviewers expect A clear definition tied to Version Control in Git & GitHub pro…

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

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…

Version Control Read answer
Junior PDF
What is a fast-forward merge?

A fast-forward merge happens when the target branch has not diverged — meaning, there re no new commits on main since you branched off. Git simply moves the branch pointer forward to include all your new commits, without…

Version Control Read answer
Mid PDF
How do you ensure secure handling of access tokens in GitHub Actions?

Answer: Security in CI/CD pipelines is crucial — you never want secrets hard-coded in code or workflows. Best practices: What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Tr…

Version Control Read answer
Mid PDF
How would you handle diverged branches with conflicting changes?

Answer: When branches diverge, Git can’t automatically merge them — it needs your help. Steps: Pull the latest changes and rebase or merge: git fetch origin git merge origin/main or git rebase origin/main What interviewe…

Version Control Read answer
Mid PDF
Force-push cleaned history:?

git push origin --force What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in pr…

Version Control Read answer
Mid PDF
How do you perform a code review using GitHub tools?

On GitHub: What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in production Real…

Version Control Read answer
Mid PDF
Squash and merge → Tag a release?

Collaboration & Workflow What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost) When you would and would not use…

Version Control Read answer
Mid PDF
Choose to Approve, Request changes, or Comment.?

Answer: Real-world example: If you’re a team lead, you review a PR for a new feature, check coding standards, ensure tests pass, and approve it before merging into main. What interviewers expect A clear definition tied t…

Version Control Read answer
Mid PDF
How do you review and approve a Pull Request?

On GitHub: What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in production Real…

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

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…

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

git fetch: It retrieves changes from a remote repository but does not apply them to your working directory. You can think of it as checking for updates without actually installing them. git pull: This does two things: it…

Version Control Read answer
Mid PDF
Initialize a repo?

git init - creates a new Git repository in the current directory. What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost)…

Version Control Read answer
Junior PDF
What is a commit? (Duplicate of #4) A snapshot of your project at a specific point in

time, including changes and a message. What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost) When you would and would n…

Version Control Read answer
Mid PDF
How do you move commits from one branch to another?

Answer: If you accidentally committed to the wrong branch, you can move those commits cleanly. Steps: Switch to the correct branch: git checkout correct-branch What interviewers expect A clear definition tied to Version…

Version Control Read answer
Mid PDF
What are hooks in Git? Can you give examples?

Git hooks are scripts that run automatically when specific Git events occur (like committing or pushing). They live inside .git/hooks/. Common examples: pre-commit: Run linting or unit tests before a commit # .git/hooks/…

Version Control Read answer
Mid PDF
What are GitHub Actions and how do they help in CI/CD?

GitHub Actions is GitHub’s built-in Continuous Integration/Continuous Deployment (CI/CD) platform. It lets you automate tasks — like running tests, building code, or deploying apps — every time code is pushed or a PR is…

Version Control Read answer
Mid PDF
How do you apply stashed changes?

To bring back your stashed work: git stash apply # reapplies the most recent stash git stash pop # reapplies AND deletes the stash git stash list # shows all stashes git stash show -p # shows what changes are in a stash…

Version Control Read answer
Mid PDF
How do you resolve merge conflicts in Git?

Answer: Merge conflicts occur when two branches modify the same part of a file differently. To resolve: Run the merge command: git merge feature/contact-form What interviewers expect A clear definition tied to Version Co…

Version Control Read answer
Mid PDF
How do you create a new Git repository?

To create a new Git repository, navigate to your project directory and use the command: git init This initializes an empty Git repository in that directory. Now you can start tracking changes in your project. Real-World…

Version Control Read answer
Junior PDF
What is a commit?

Answer: (Duplicate of #4) A snapshot of your project at a specific point in time, including changes and a message. What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-of…

Version Control Read answer
Mid PDF
How do you clean up old branches automatically?

Old branches can clutter your repo. You can clean them locally and remotely. Commands: To delete merged branches locally: git branch --merged main | grep -v "main" | xargs git branch -d To prune deleted remote branches:…

Version Control Read answer
Mid PDF
Warn your team and tell them to re-clone the repo (to avoid old secrets locally).?

Answer: Example: You pushed .env with a production API key. Even after deletion, it’s still in the Git history — so you must clean and rotate keys right away. What interviewers expect A clear definition tied to Version C…

Version Control Read answer
Mid PDF
How would you roll back a production release using Git?

There are several safe rollback methods: Option 1 — Revert to a previous tag (recommended): git revert <commit-hash> git push origin main This creates a new commit that undoes the bad release. Option 2 — Deploy a s…

Version Control Read answer
Mid PDF
How can you enforce code review policies on GitHub?

You can enforce reviews and branch protection rules in repository settings under Settings → Branches → Branch protection rules. You can require: Pull requests before merging At least one approval Passing CI checks (e.g.,…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

Answer: ctions? Security in CI/CD pipelines is crucial — you never want secrets hard-coded in code or workflows. Best practices:

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

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.

Permalink & share

Git & GitHub Developer Essentials · Version Control

A fast-forward merge happens when the target branch has not diverged — meaning, there

re no new commits on main since you branched off. Git simply moves the branch pointer

forward to include all your new commits, without creating a new merge commit.

Example:

If main has not changed since you created your feature/navbar branch, merging it back

will simply “fast-forward” main to the latest commit.

git merge feature/navbar

No merge commit — just a pointer move.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Security in CI/CD pipelines is crucial — you never want secrets hard-coded in code or workflows. Best practices:

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: When branches diverge, Git can’t automatically merge them — it needs your help. Steps: Pull the latest changes and rebase or merge: git fetch origin git merge origin/main or git rebase origin/main

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

git push origin --force

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

On GitHub:

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Collaboration & Workflow

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Real-world example: If you’re a team lead, you review a PR for a new feature, check coding standards, ensure tests pass, and approve it before merging into main.

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

On GitHub:

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

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.

Permalink & share

Git & GitHub Developer Essentials · Version Control

  • git fetch: It retrieves changes from a remote repository but does not apply them to

your working directory. 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.

Permalink & share

Git & GitHub Developer Essentials · Version Control

git init - creates a new Git repository in the current directory.

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

time, including changes and a message.

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: If you accidentally committed to the wrong branch, you can move those commits cleanly. Steps: Switch to the correct branch: git checkout correct-branch

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Git hooks are scripts that run automatically when specific Git events occur (like committing

or pushing).

They live inside .git/hooks/.

Common examples:

pre-commit: Run linting or unit tests before a commit

# .git/hooks/pre-commit

npm run lint || exit 1

  • pre-push: Prevent pushes to main
if [ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]; then

echo "You can't push directly to main!"

exit 1

fi

  • Example:

In a team, we set a pre-commit hook to check code formatting with ESLint before any

commit — ensuring consistency across all contributors.

Permalink & share

Git & GitHub Developer Essentials · Version Control

GitHub Actions is GitHub’s built-in Continuous Integration/Continuous Deployment

(CI/CD) platform.

It lets you automate tasks — like running tests, building code, or deploying apps — every

time code is pushed or a PR is opened.

Example:

You can create a workflow file .github/workflows/test.yml:

name: Run Tests

on: [push, pull_request]

jobs:

test:

runs-on: ubuntu-latest

steps:

  • uses: actions/checkout@v4
  • name: Install dependencies

run: npm install

  • name: Run tests

run: npm test

Whenever code is pushed, GitHub automatically runs your tests — ensuring quality before

merging.

Permalink & share

Git & GitHub Developer Essentials · Version Control

To bring back your stashed work:

git stash apply # reapplies the most recent stash

git stash pop # reapplies AND deletes the stash

git stash list # shows all stashes

git stash show -p # shows what changes are in a stash

Real-world example:

fter resolving the production issue, you return to your feature branch and restore your

previous changes with git stash pop.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Merge conflicts occur when two branches modify the same part of a file differently. To resolve: Run the merge command: git merge feature/contact-form

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

To create a new Git repository, navigate to your project directory and use the command:

git init

This initializes an empty Git repository in that directory. Now you can start tracking changes

in your project.

Real-World Example:

Imagine you're starting a new website project on your computer. You open your terminal, go

to your project folder, and type git init. This sets up the Git repository, and you can start

tracking your changes immediately.

Permalink & share

Git & GitHub Developer Essentials · Version Control

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

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Old branches can clutter your repo. You can clean them locally and remotely.

Commands:

To delete merged branches locally:

git branch --merged main | grep -v "main" | xargs git branch -d

  • To prune deleted remote branches:

git fetch --prune

  • Example:

fter several months, your repo has 50 old feature branches. You can prune them

utomatically in CI or periodically with these commands.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Example: You pushed .env with a production API key. Even after deletion, it’s still in the Git history — so you must clean and rotate keys right away.

What interviewers expect

  • A clear definition tied to Version Control in Git & GitHub projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production Git & GitHub application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in Git & GitHub architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

Git & GitHub Developer Essentials · Version Control

There are several safe rollback methods:

Option 1 — Revert to a previous tag (recommended):

git revert <commit-hash>

git push origin main

This creates a new commit that undoes the bad release.

Option 2 — Deploy a stable tag:

git checkout v1.2.3

git push origin main --force

Example:

If version v2.0 introduced a bug in the payment flow, I revert to v1.9.1 (the last stable tag)

nd redeploy while investigating the issue.

In CI/CD pipelines:

We often have a ROLLBACK_TAG variable that can deploy a known safe version

utomatically.

Permalink & share

Git & GitHub Developer Essentials · Version Control

You can enforce reviews and branch protection rules in repository settings under

Settings → Branches → Branch protection rules.

You can require:

  • Pull requests before merging
  • At least one approval
  • Passing CI checks (e.g., GitHub Actions)
  • No direct pushes to main

Example:

Your team sets a rule that all PRs must be reviewed by at least one other developer and

must pass automated tests before merging.

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