Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: You can view the commit history by using the command: git log This shows a list of commits, with each commit’s hash, author, date, and message. Real-World Example: Imagine you're trying to figure out when a…
Short answer: Manually editing files to combine conflicting changes, then staging and committing them. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR to main ; resol…
Short answer: base commit, creating a linear history. 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 interv…
Short answer: Rewrites commit history by moving a sequence of commits to a new base commit, creating a linear history. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR…
Short answer: local repository, but doesn't merge them. 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 intervie…
Short answer: Downloads commits, files, and refs from a remote repository into your local repository, but doesn't merge them. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so br…
Short answer: git remote add <name> <url> - links a local repository to a remote one (e.g., GitHub). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to a pr…
Short answer: git clone <url> - creates a local copy of a remote repository. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnotice…
Short answer: intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. i…
Short answer: A file (.gitignore) that tells Git which files or directories to intentionally ignore from being tracked. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken b…
Short answer: git status (summary), git diff (detailed changes). 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…
Short answer: git reset HEAD <file> (unstage). 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 D…
Short answer: git restore <file> (unstage/discard working dir changes), git reset HEAD <file> (unstage). Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken buil…
Short answer: working dir changes), git reset HEAD <file> (unstage). Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say t…
Short answer: And optionally changes the staging area/working directory to a specified commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach product…
Short answer: git reset --soft/--mixed/--hard <commit> - moves HEAD and optionally changes the staging area/working directory to a specified commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs wit…
Short answer: changes of a previous commit, preserving history. 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…
Short answer: git revert <commit> - creates a new commit that undoes the changes of a previous commit, preserving history. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so…
Short answer: git checkout <commit> -- <file> - restores a file to its state at a specific commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds nev…
Short answer: reset rewrites history; revert creates a new commit to undo changes, preserving history. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach…
Short answer: Shows a log of where your HEAD and branch tips have been, useful for recovering lost commits. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never…
Short answer: by an existing commit from another branch onto your current branch. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed…
Short answer: git cherry-pick <commit> - applies the changes introduced by an existing commit from another branch onto your current branch. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews…
Short answer: remote server); branching creates a lightweight, isolated line of development within a single repository. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a P…
Short answer: Forking creates a copy of an entire repository (often on a remote server); branching creates a lightweight, isolated line of development within a single repository. Example code Forking creates a copy of an…
Git & GitHub Developer Essentials · Version Control
Short answer: You can view the commit history by using the command: git log This shows a list of commits, with each commit’s hash, author, date, and message. Real-World Example: Imagine you're trying to figure out when a bug was introduced to your code. By running git log, you can see all previous commits, helping you pinpoint the changes that might have caused the issue. Branching & Merging
Git & GitHub Developer Essentials · Version Control
Short answer: Manually editing files to combine conflicting changes, then staging and committing them.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Git & GitHub Developer Essentials · Version Control
Short answer: base commit, creating a linear history.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Git & GitHub Developer Essentials · Version Control
Short answer: Rewrites commit history by moving a sequence of commits to a new base commit, creating a linear history.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Git & GitHub Developer Essentials · Version Control
Short answer: local repository, but doesn't merge them.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: Downloads commits, files, and refs from a remote repository into your local repository, but doesn't merge them.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git remote add <name> <url> - links a local repository to a remote one (e.g., GitHub).
Git & GitHub Developer Essentials · Version Control
Short answer: git clone <url> - creates a local copy of a remote repository.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked.
intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked. intentionally ignore from being tracked.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: A file (.gitignore) that tells Git which files or directories to intentionally ignore from being tracked.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git status (summary), git diff (detailed changes).
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git reset HEAD <file> (unstage).
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git restore <file> (unstage/discard working dir changes), git reset HEAD <file> (unstage).
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: working dir changes), git reset HEAD <file> (unstage).
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: And optionally changes the staging area/working directory to a specified commit.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git reset --soft/--mixed/--hard <commit> - moves HEAD and optionally changes the staging area/working directory to a specified commit.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: changes of a previous commit, preserving history.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git revert <commit> - creates a new commit that undoes the changes of a previous commit, preserving history.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git checkout <commit> -- <file> - restores a file to its state at a specific commit.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: reset rewrites history; revert creates a new commit to undo changes, preserving history.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: Shows a log of where your HEAD and branch tips have been, useful for recovering lost commits.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: by an existing commit from another branch onto your current branch.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: git cherry-pick <commit> - applies the changes introduced by an existing commit from another branch onto your current branch.
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Git & GitHub Developer Essentials · Version Control
Short answer: remote server); branching creates a lightweight, isolated line of development within a single repository.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Git & GitHub Developer Essentials · Version Control
Short answer: Forking creates a copy of an entire repository (often on a remote server); branching creates a lightweight, isolated line of development within a single repository.
Forking creates a copy of an entire repository (often on a remote server); branching creates a lightweight, isolated line of development within a single repository.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.