Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: 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…
Short answer: 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…
Short answer: A commit in Git is a snapshot of your project at a specific point in time. Explain a bit more It records all the changes you've made to the files and saves them to the repository. Every commit has a unique…
Short answer: 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 pr…
Short answer: 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 pr…
Short answer: git fetch: It retrieves changes from a remote repository but does not apply them to your working directory. Explain a bit more You can think of it as checking for updates without actually installing them. g…
Short answer: time, including changes and a message. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead of update . Say this in the interview Define — one clear sentence (t…
Short answer: (Duplicate of #4) A snapshot of your project at a specific point in time, including changes and a message. Real-world example (ShopNest) Prefer clear commits: fix(cart): prevent negative quantities instead…
Short answer: A lightweight, movable pointer to a commit, allowing for parallel development. Real-world example (ShopNest) Feature work for “UPI payment” lives on feature/upi-payment . Open a PR to main ; resolve conflic…
Short answer: Aspect GitHub Flow Git Flow Purpose Simple branching model for continuous delivery Structured model for release management Branche Only main and short-lived feature branches Multiple: main, develop, feature…
Short answer: A detached HEAD happens when Git’s HEAD (your current position) points to a specific commit instead of a branch. Explain a bit more If you make new commits in this state, they won’t belong to any branch — y…
Short answer: A detached HEAD occurs when Git’s HEAD (which points to your current branch) points to a specific commit instead of a branch. Explain a bit more This means you’re not working on any branch — any new commits…
Short answer: The .gitignore file tells Git which files or directories it should ignore when tracking changes. Explain a bit more This is useful for files that aren’t necessary in the repository, like log files, compiled…
Short answer: to build, test, and deploy code directly from GitHub. 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…
Short answer: The default name for the remote repository from which a project was originally cloned. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach p…
Short answer: A pointer to the current commit you are on in your local 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: A configuration file that stores user-specific Git settings (e.g., username, email, aliases). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to a project…
Short answer: Shows changes between the staging area and the last commit. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Say th…
Short answer: Displays the commit history of the current branch. 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: Shows the URLs of the remote repositories associated with your local repo. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production un…
Short answer: performing a binary search on the commit 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: A command used to find the commit that introduced a bug by performing a binary search on the commit history. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broke…
Short answer: Checks the integrity of the Git file system. 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 inter…
Short answer: Cleans up unnecessary files and optimizes the local repository. Real-world example (ShopNest) ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed. Sa…
Short answer: A merge where the branch being merged can simply be moved forward to the tip of the other branch without creating a new merge commit. Real-world example (ShopNest) Feature work for “UPI payment” lives on fe…
Git & GitHub Developer Essentials · Version Control
Short answer: 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)
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).
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 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
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 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.
Git & GitHub Developer Essentials · Version Control
Short answer: 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.
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 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.
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 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.
Git & GitHub Developer Essentials · Version Control
Short answer: time, including changes and a message.
Prefer clear commits: fix(cart): prevent negative quantities instead of update.
Git & GitHub Developer Essentials · Version Control
Short answer: (Duplicate of #4) A snapshot of your project at a specific point in time, including changes and a message.
Prefer clear commits: fix(cart): prevent negative quantities instead of update.
Git & GitHub Developer Essentials · Version Control
Short answer: A lightweight, movable pointer to a commit, allowing for parallel development.
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: Aspect GitHub Flow Git Flow Purpose Simple branching model for continuous delivery Structured model for release management Branche Only main and short-lived feature branches Multiple: main, develop, feature, release, hotfix Workflow Create branch → Commit → Pull Request → Merge → Deploy Feature branches merge into develop, then release/hotfix merges into main Use Case SaaS projects, frequent deploys Complex products…
GitHub Flow → Used by startups deploying updates daily. Git Flow → Used by large software teams (e.g., enterprise apps) with versioned releases.
Git & GitHub Developer Essentials · Version Control
Short answer: A detached HEAD happens when Git’s HEAD (your current position) points to a specific commit instead of a branch.
If you make new commits in this state, they won’t belong to any branch — you could lose them if you switch branches. How to fix it: If you accidentally commit in a detached HEAD state: git switch -c temp-branch This creates a new branch from your current state so your commits aren’t lost. Example: You checked out an old commit to test something: git checkout a1b2c3d If you make changes, create a branch to save them before switching back.
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 detached HEAD occurs when Git’s HEAD (which points to your current branch) points to a specific commit instead of a branch.
This means you’re not working on any branch — any new commits made in this state are “orphaned” unless you create a branch from them. Example: If you check out an old commit directly: git checkout a1b2c3d You’re in a detached HEAD state. If you make changes here and don’t create a new branch, you could lose them later. Fix: Create a new branch to save your work: git checkout -b hotfix/rollback-test
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: The .gitignore file tells Git which files or directories it should ignore when tracking changes.
This is useful for files that aren’t necessary in the repository, like log files, compiled binaries, or local configuration files. Real-World Example: If you're working on a Node.js project, you likely don’t want to track the node_modules/ directory, since it can be recreated by running npm install. You can add node_modules/ to your .gitignore file to ensure that Git doesn't track those files.
Git & GitHub Developer Essentials · Version Control
Short answer: to build, test, and deploy code directly from GitHub.
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: The default name for the remote repository from which a project was originally cloned.
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 pointer to the current commit you are on in your local 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: A configuration file that stores user-specific Git settings (e.g., username, email, aliases).
Git & GitHub Developer Essentials · Version Control
Short answer: Shows changes between the staging area and the last 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: Displays the commit history of the 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: Shows the URLs of the remote repositories associated with your local repo.
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: performing a binary search on the commit 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: A command used to find the commit that introduced a bug by performing a binary search on the commit 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: Checks the integrity of the Git file system.
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: Cleans up unnecessary files and optimizes the local 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: A merge where the branch being merged can simply be moved forward to the tip of the other branch without creating a new merge commit.
Feature work for “UPI payment” lives on feature/upi-payment. Open a PR to main; resolve conflicts before merge.
Install Toolliyo like an app Free
Home-screen access to tutorials, coding practice & career tools — no app store needed.
On iPhone/iPad: tap Share then Add to Home Screen.