InterviewStack.io LogoInterviewStack.io

Git and Version Control Questions

Comprehensive knowledge of Git and general version control concepts, including distributed repository fundamentals, local versus remote repositories, the staging area, commit history, and common Git commands for cloning, committing, branching, merging, pushing, and pulling. Practical skills in branching and code flow strategies such as feature branching, trunk based development, Git Flow, and GitHub Flow, including when and why teams choose each strategy, their trade offs for release cadence and team size, and how they affect continuous integration and continuous delivery pipelines. Proficiency with merge strategies and conflict resolution, rebasing versus merging, pull request and code review workflows, integrating version control with automated pipelines and code quality checks, and troubleshooting common Git issues and merge conflicts.

MediumTechnical
103 practiced
Your CI builds are slow because the repository contains many large binary artifacts. Describe how Git LFS works, steps to migrate existing large files out of history (e.g., using the BFG or git filter-repo), and the operational considerations when converting an active repo to use LFS.
MediumTechnical
86 practiced
Design a policy and implementation to prevent accidentally committing large files or vendor directories into a Git repository. Include use of .gitignore, pre-commit hooks, CI checks, repository size monitoring, and a remediation plan for existing offenders.
MediumTechnical
72 practiced
Your CI/CD pipeline triggers deployments when a semver tag is pushed, but some developers accidentally create tags with the wrong format and trigger unintended deploys. Propose a technical solution using Git hosting features, CI filters, or hooks to validate tags before triggering production deployments and safely block misformatted tags.
MediumTechnical
82 practiced
You have a flaky test that intermittently fails and blocks merges because the repo requires a green CI. Describe strategies you could use with Git/Git hosting features and CI to prevent flakiness from blocking development while keeping quality high (e.g., merge queues, retry policies, split pipelines).
HardTechnical
90 practiced
You suspect the remote Git repository has corrupt objects after CI jobs started failing with git errors. Explain the steps you would take to detect corruption, isolate the problem, restore service (e.g., using a mirror or backup), and prevent recurrence. Include commands like git fsck and git clone --mirror in your answer.

Unlock Full Question Bank

Get access to hundreds of Git and Version Control interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.