Version Control & Hosting
Git itself plus the platforms built around it — GitHub, GitLab, Bitbucket — where repositories, code review, CI, packages and cloud dev environments live. Interviewers use this area constantly because every job involves a branching model, a review process, and a pipeline attached to a push.
on this pageshowhide
explore
- Git (has its own guide)245 questions
- Object Model and DAG27 questions
- Staging and Commits18 questions
- Branching and Merging26 questions
- Rebase and History Rewriting32 questions
- Remotes and Collaboration35 questions
- Stash, Reflog, and Recovery20 questions
- Inspecting History16 questions
- Hooks13 questions
- Submodules, Subtrees, and Worktrees13 questions
- Branching Workflows20 questions
- Configuration, Ignore Rules, and Attributes25 questions
- Git LFSempty
- GitHub (has its own guide)77 questions
- Repositories and PR Workflow29 questions
- Code Review6 questions
- GitHub Actions4 questions
- Issues and Projects6 questions
- Releases and Packages5 questions
- Security Features21 questions
- API, Apps, and Webhooks6 questions
- GitLabempty
- CI/CD Pipelinesempty
- Security Scanningempty
- Self-Managed vs SaaSempty
- Bitbucketempty
- Bitbucket Pipelinesempty
- GitHub CLIempty
- gh api and Scriptingempty
- GitHub Codespacesempty
- GitHub Packagesempty
→ has its own guide
- Blockchain Developerroleanchors this topic
- DevOps / SRE Engineerroleanchors this topic
- AI & Data Scientistrole
- AI Engineerrole
- AI Red Teamingrole
- Android Developerrole
- BI Analystrole
- Backend Developerrole
- Data Analystrole
- Data Engineerrole
- DevSecOps Engineerrole
- Frontend Developerrole
- Full Stack Developerrole
- Game Developerrole
- Git & GitHubskill
- Java Backend Developerrole
- Java SDETrole
- Kotlin Backend Developerrole
- MLOps Engineerrole
- Machine Learning Engineerrole
- Network Engineerrole
- PostgreSQL DBArole
- QA Engineerrole
- Software Architectrole
- Vibe Codingskill
- iOS Developerrole
questions
322 · 2 sectionsIn Git, what does creating a branch with git branch feature actually do?
basics
~20 sIt writes one new ref holding the hash of the commit you branched from. No files are copied and no history is duplicated, which is why branching is instant in a repository of any size.
In Git, what do the <<<<<<<, =======, and >>>>>>> markers in a conflicted file mean?
basics
~20 sGit writes both versions of a region it could not merge into the file. Text between <<<<<<< and ======= is the side you are on; text between ======= and >>>>>>> is the incoming side. You edit the file to the final content, delete the markers, and stage it.
In Git, what is a fast-forward merge and when can Git perform one?
basics
~20 sA fast-forward merge happens when the current branch's commit is already an ancestor of the commit being merged. Git records no merge commit; it simply moves the branch pointer forward and updates the index and working tree.
In Git, what is a three-way merge and which three commits does it use?
basics
~20 sA three-way merge combines two branch tips using their best common ancestor, the merge base, as a reference point. Comparing each tip against that base tells Git which side changed what, so it can combine changes instead of guessing.
In Git, how do the --system, --global and --local config scopes differ, and which one wins?
basics
~10 sThey name three config files: machine-wide, per-user, and per-repository. Git reads them in that order and the narrower scope wins, so a repository's .git/config overrides your home-directory settings, which override the system file.
What is GitHub Actions, and where in a repository must a workflow file live to be run?
basics
~10 sGitHub Actions is GitHub's built-in automation and CI/CD system. A workflow is a YAML file in the repository's .github/workflows directory that declares the events triggering it and the jobs to run when one occurs.
In GitHub, what happens when you push straight to main if a rule requires a pull request?
basics
~20 sGitHub's server refuses the push. The remote rejects the ref update with a protected-branch error, nothing lands on main, and your local commits are untouched — you push a topic branch and open a pull request instead.
On a GitHub pull request, what is the difference between Approve, Request changes, and Comment?
basics
~20 sApprove endorses the pull request and counts toward any required approvals. Request changes records a blocking objection that stays until the reviewer approves or the review is dismissed. Comment leaves feedback with no verdict either way.
In GitHub, what is a Dependabot alert and where does its data come from?
basics
~20 sA Dependabot alert is GitHub telling you that a package your repository depends on has a known vulnerability. It comes from matching the repository's dependency graph, built from committed manifests and lockfiles, against the GitHub Advisory Database.
In GitHub, how do you make a merged pull request close an issue automatically?
basics
~20 sPut a closing keyword and the issue number, such as "Fixes #123", in the pull request description or in a commit message. When that pull request merges into the repository's default branch, GitHub closes the linked issue.