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 51–75 of 195

Popular tracks

Mid PDF
What are submodules in Git, and when would you use them?

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

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

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

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

dd the resolved file: git add <file> git commit # or continue the rebase What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainabi…

Version Control Read answer
Junior PDF
What is the difference between git revert and git reset?

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

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

Mark conflicts as resolved: git add <filename> git commit What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security,…

Version Control Read answer
Mid PDF
What are the key areas of a Git project? (Working Directory, Staging Area, Repository)

Working Directory: This is where you make changes to the files. 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 th…

Version Control Read answer
Mid PDF
Git file states?

Answer: Working Directory (modified files), Staging Area (files marked for next commit), Local Repository (committed files). What interviewers expect A clear definition tied to Version Control in Git & GitHub project…

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

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…

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,”?

nother to “v2.0.” Git will stop and ask you to pick which to keep. What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maintainability, security, cost…

Version Control Read answer
Mid PDF
Explain the difference between --soft, --mixed, and --hard resets.

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. -mixed (default) Moves HEAD and…

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,?

Answer: nother changes the same header), Git won’t know which to keep — you decide manually. What interviewers expect A clear definition tied to Version Control in Git & GitHub projects Trade-offs (performance, maint…

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

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-wor…

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

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…

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

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
Example:?

Answer: When migrating a legacy product from SVN, I ran the migration on a weekend, verified history integrity with the team, and locked SVN after the Git migration was complete. What interviewers expect A clear definiti…

Version Control Read answer
Mid PDF
How do you debug a detached HEAD issue?

Answer: A detached HEAD means Git’s HEAD points to a specific commit instead of a branch — commits made now won’t belong to any branch. To fix it: Check what commit you’re on: git status What interviewers expect A clear…

Version Control Read answer
Mid PDF
Merge or push this branch back to restore the lost history.?

Answer: Example: If your teammate accidentally ran git push origin main --force, you can still restore your lost commits using your local reflog if you had pulled the branch before the overwrite. What interviewers expect…

Version Control Read answer
Mid PDF
Optionally, trigger CI/CD checks automatically via GitHub Actions.?

Example: Before approving a PR for a new payment API, I check: Code readability and naming consistency Proper test coverage Security considerations (e.g., no API keys in code) Bonus: I sometimes use Suggested Changes in…

Version Control Read answer
Mid PDF
How do you resolve conflicts in a pull request?

Answer: When GitHub reports conflicts in a PR: Fetch and switch to your branch locally: git fetch origin git checkout feature/new-ui What interviewers expect A clear definition tied to Version Control in Git & GitHub…

Version Control Read answer
Mid PDF
Add comments or suggestions.?

Follow: 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-wo…

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

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

Version Control Read answer
Mid PDF
Creates a merge commit if necessary (to record the combination).?

Answer: Example: If you merge feature/login into main, Git finds the last point they shared code, applies your login branch changes, and creates a new commit that connects both histories. Intermediate / Advanced Git Conc…

Version Control Read answer
Mid PDF
What are the pros and cons of rebasing vs merging?

spect Merging Rebasing History Keeps all commits, including merge commits Creates a linear, cleaner history Safety Safe for shared/public branches Risky for shared branches (rewrites history) Use Case When collaboration…

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

A commit in Git is a snapshot of your project at a specific point in time. It records all the changes you've made to the files and saves them to the repository. Every commit has a unique ID, and it's like a save point in…

Version Control Read answer
Mid PDF
Git commit?

Answer: 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, m…

Version Control Read answer

Git & GitHub Developer Essentials · Version Control

A Git submodule is a repository inside another repository — useful for including shared

components or libraries.

Example:

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

Permalink & share

Git & GitHub Developer Essentials · Version Control

Forking is when you create your own copy of someone else’s GitHub repository.

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.

Permalink & share

Git & GitHub Developer Essentials · Version Control

dd the resolved file: git add <file> git commit # or continue the rebase

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

Comman

Description Safe for shared

repos?

git revert Creates a new commit that undoes changes from a

previous commit

✅ Yes

git reset Moves the branch pointer back to a previous commit,

potentially removing commits

❌ No (rewrites

history)

Example:

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

Git & GitHub Developer Essentials · Version Control

Mark conflicts as resolved: git add <filename> git commit

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

  • Working Directory: This is where you make changes to the files. 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:

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.

Follow:

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Working Directory (modified files), Staging Area (files marked for next commit), Local Repository (committed files).

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

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

Git & GitHub Developer Essentials · Version Control

nother to “v2.0.” Git will stop and ask you to pick which to keep.

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

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.

  • -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

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: nother changes the same header), Git won’t know which to keep — you decide manually.

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

  • 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.

Permalink & share

Git & GitHub Developer Essentials · Version Control

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 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.

Follow:

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

Answer: When migrating a legacy product from SVN, I ran the migration on a weekend, verified history integrity with the team, and locked SVN after the Git migration was complete.

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: A detached HEAD means Git’s HEAD points to a specific commit instead of a branch — commits made now won’t belong to any branch. To fix it: Check what commit you’re on: git status

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: Example: If your teammate accidentally ran git push origin main --force, you can still restore your lost commits using your local reflog if you had pulled the branch before the overwrite.

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

Example:

Before approving a PR for a new payment API, I check:

  • Code readability and naming consistency
  • Proper test coverage
  • Security considerations (e.g., no API keys in code)

Bonus:

I sometimes use Suggested Changes in GitHub comments to make small fixes easier for

contributors.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: When GitHub reports conflicts in a PR: Fetch and switch to your branch locally: git fetch origin git checkout feature/new-ui

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

Follow:

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

A Pull Request is a request to merge your changes from one branch or fork into another

repository or branch — typically to propose new code, bug fixes, or improvements.

Example:

You fixed a typo or added a feature in your fork of a project. You create a PR asking the

original maintainers to “pull” your changes into their main branch.

PRs enable:

  • Code review
  • Automated testing
  • Discussion before merging
Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: Example: If you merge feature/login into main, Git finds the last point they shared code, applies your login branch changes, and creates a new commit that connects both histories. Intermediate / Advanced Git Concepts

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

spect Merging Rebasing

History Keeps all commits, including merge

commits

Creates a linear, cleaner history

Safety Safe for shared/public branches Risky for shared branches (rewrites

history)

Use

Case

When collaboration is ongoing When you want a clean, linear history

before merging

Real-world example:

Before merging a feature into main, many teams rebase it to make the commit history

cleaner. But during teamwork, merging is safer because it doesn’t rewrite other people’s

work.

Permalink & share

Git & GitHub Developer Essentials · Version Control

A commit in Git is a snapshot of your project at a specific point in time. It records all the

changes you've made to the files and saves them to the repository. Every commit has a

unique ID, and it's like a save point in a video game—if something breaks, you can go back

to any commit.

Real-World Example:

Let’s say you fixed a bug on the homepage of your app. After completing the fix, you commit

the changes to the repository. Later, if the fix causes an issue, you can roll back to the

previous commit.

Permalink & share

Git & GitHub Developer Essentials · Version Control

Answer: 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
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