Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
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…
Git & GitHub Developer Essentials · Version Control
Answer: Working Directory (modified files), Staging Area (files marked for next commit), Local Repository (committed files).
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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:
Git & GitHub Developer Essentials · Version Control
nother to “v2.0.” Git will stop and ask you to pick which to keep.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
Reset
Type
What It Does Example Scenario
but keeps your changes staged
You committed too early and just
want to edit the message or add
more changes.
(default)
Moves HEAD and unstages files but
keeps your changes in the working
directory
You want to redo your git add
selections.
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
Git & GitHub Developer Essentials · Version Control
Answer: nother changes the same header), Git won’t know which to keep — you decide manually.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
■ 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.
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:
Follow:
Git & GitHub Developer Essentials · Version Control
git push origin --force
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
Example:
Before approving a PR for a new payment API, I check:
Bonus:
I sometimes use Suggested Changes in GitHub comments to make small fixes easier for
contributors.
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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
Follow:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.
Git & GitHub Developer Essentials · Version Control
Answer: A snapshot of your project at a specific point in time, including changes and a message.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
git push origin --force
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
On GitHub:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
Collaboration & Workflow
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
Git & GitHub Developer Essentials · Version Control
On GitHub:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.