Skip to content
InterviewEra
What is InterviewEraThe platform, founder, and missionHow It WorksAdaptive interview, live captions, scoringResume-aware ScoringCV-native questions + 5-dimension feedback
Campus Placements OverviewStructured mock interviews and cohort analytics for T&P teamsSet up Campus WorkspaceCreate your campus dashboard and invite your batchT&P Product & PricingPilot pricing, bulk onboarding, and placement trackingStudent Invitation HelpHow to accept a campus invite and start practising
Software EngineerDSA, system design, OOP roundsFrontend DeveloperReact, HTML/CSS, JavaScript interviewsTCS Interview QuestionsNQT + technical + HR roundsWipro Careers HubNLTH, WILP, Turbo hiring tracksSolera Careers HubCognitive assessment + Java/SQL roundsReact Interview QuestionsHooks, state, performance topics
Interview Question GeneratorRole-specific questions in secondsATS Resume CheckerScore your resume against job rolesSTAR Answer BuilderStructure behavioral answers clearly
All ResourcesCentral guide and hub directoryBlogInterview prep articles and guidesAgentic AI Interview GuideAI-assisted coding interviews, rubrics, and prepPlacement GuideStep-by-step campus prep playbookSTAR Method GuideMaster behavioral answers
Help CenterGuides, FAQs, and supportDSA Topic MapPatterns, roadmap, and top 50 problemsSoftware Engineer GuideSWE questions and prep hubAndroid GuideKotlin, Compose, MVVM prep hubFrontend GuideReact and JavaScript interviews
PricingFor Teams
Sign inSign up
InterviewEra

InterviewEra is an AI-powered mock interview platform with adaptive follow-ups, resume-aware scoring, and structured interview preparation for campus placements and early-career hiring.

Start Mock Interview

Mock Interview

  • How It Works
  • For Teams
  • Start Mock Interview
  • Campus Placements
  • Campus Workspace
  • Help Center

Free Tools

  • Interview Question Generator
  • ATS Resume Checker
  • STAR Answer Builder

Interview Questions

  • Wipro Careers Hub
  • Solera Careers Hub
  • Amazon SDE Questions
  • Microsoft SDE Questions
  • Infosys SWE Questions
  • Infosys Java Questions
  • Freshworks Frontend Questions
  • Android Developer Questions
  • Frontend Developer Questions
  • Java Developer Questions

Resources

  • Community Hub
  • All Resources
  • Blog
  • Agentic AI Interview Guide
  • What Is Agentic AI
  • Agentic Coding Round
  • AI Prompt Engineering
  • Cursor AI Interview Guide
  • DSA Topic Map
  • Placement Guide
  • STAR Guide
  • HR Guide
  • Interview Tips

Company

  • What is InterviewEra
  • About Us
  • Pricing
  • Contact

© 2026 InterviewEra. All rights reserved.

Privacy PolicyTermsRefundRanchi, Jharkhand, India
Interview Questions›Topics›Git

DevOps · Fresher-relevant

Git Interview Questions 2026

Git interview questions on branching strategies, merge vs. rebase, cherry-pick, and resolving conflicts in collaborative workflows.

DevOpsFresher-relevant

Git Interview Questions

Placement-oriented · Updated 2026
  1. 01

    What is the difference between git merge and git rebase?

    TechnicalMedium

    Tip: Merge creates a merge commit, preserving the true branching history (non-destructive). Rebase replays your commits on top of the target branch for a linear history, but rewrites commit hashes. Rule of thumb: rebase local/private branches, never rebase shared/pushed history.

  2. 02

    What is the difference between git fetch and git pull?

    TechnicalEasy

    Tip: git fetch downloads remote changes into remote-tracking branches without touching your working branch. git pull is fetch + merge (or rebase with --rebase) into your current branch. Fetch lets you review before integrating; pull integrates immediately.

  3. 03

    How do you undo commits — reset vs revert?

    TechnicalMedium

    Tip: git revert creates a new commit that undoes a previous one — safe for shared history. git reset moves the branch pointer back: --soft keeps changes staged, --mixed unstages them, --hard discards them. Use revert on pushed commits, reset on local-only work.

  4. 04

    What is the difference between git reset, git stash, and git checkout?

    TechnicalMedium

    Tip: stash shelves uncommitted changes to switch context, restored later with stash pop. reset moves the branch/HEAD and optionally changes the index/working tree. checkout (or switch/restore in modern Git) switches branches or restores files. They operate on different parts of Git's three trees.

  5. 05

    Explain a typical Git branching strategy.

    TechnicalMedium

    Tip: Common: trunk-based (short-lived feature branches merged to main behind feature flags, fast CI/CD) or GitFlow (main, develop, feature, release, hotfix — heavier). Most modern teams prefer trunk-based with PRs and protected main for speed and fewer merge conflicts.

  6. 06

    How do you resolve a merge conflict?

    TechnicalEasy

    Tip: Git marks conflicting regions with <<<<<<<, =======, >>>>>>>. Edit each file to the correct combined result, remove the markers, git add the resolved files, then commit (or continue the rebase/merge). Tools like a 3-way merge editor help on complex conflicts.

  7. 07

    What does git cherry-pick do?

    TechnicalMedium

    Tip: cherry-pick applies the changes from a specific commit onto your current branch as a new commit — useful for porting a bug fix to a release branch without merging everything. It can cause duplicate commits if the branch is later merged, so use it deliberately.

  8. 08

    What is the difference between the working directory, staging area, and repository?

    TechnicalEasy

    Tip: The working directory holds your actual files. git add moves changes to the staging area (index) — a snapshot of what will be committed. git commit records the staged snapshot into the local repository. git push then publishes commits to the remote.

Practice Git questions with your own resume

InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.

Start free mock interviewFree question generator

Roles that need Git

  • Software Engineer questions
  • Frontend Developer questions
  • Backend Developer questions
  • DevOps Engineer questions
  • QA Engineer questions

Related devops topics

  • Docker questions
  • Linux questions
  • Kubernetes questions

Practice tools

  • Interview question generator
  • ATS resume checker
  • STAR answer builder

Guides and resources

  • All interview questions
  • HR interview answer tips
  • STAR method with examples