Remotes and Collaboration
You will learn what a remote-tracking ref is, how fetch, pull and push actually update it, and why pull --rebase produces different history than plain pull. This is where interviewers probe your understanding of the fork-and-pull-request model most teams work in.
part ofGitoverview, primer and where to startread it →on this pageshowhide
explore
- Remotes and Refspecs4 questions
- Fetch vs Pull5 questions
- Tracking Branches and Divergence5 questions
- Push Semantics6 questions
- Clone, Shallow, and Partial Clone5 questions
- Transports and Credentials6 questions
- Forks and Upstream Sync4 questions
- BI Analystroleanchors this topic
- AI & Data Scientistrole
- AI Engineerrole
- AI Red Teamingrole
- Android Developerrole
- Backend Developerrole
- Blockchain Developerrole
- Data Analystrole
- Data Engineerrole
- DevOps / SRE 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
- iOS Developerrole
questions
page 2 of 2How would you maintain a long-lived fork carrying local patches on top of an actively developed upstream project?
basics
~20 sKeep local changes as a small, curated commit series on a branch above an untouched mirror of upstream, refresh it by rebasing onto each new upstream release, measure the recurring conflict cost, and continuously shrink the delta by getting patches accepted upstream.
How do you decide between SSH keys and HTTPS tokens for Git access across many CI jobs and machines?
basics
~20 sJudge each option on lifetime, scope, how the secret reaches the git process, and what happens when a machine is compromised. Tokens favour short-lived, narrowly scoped, easily rotated automation; keys favour stable identities where port 443 is unavailable or an agent already exists.
In Git, what does branch.autoSetupMerge control when you create a new branch?
basics
~20 sbranch.autoSetupMerge decides whether a newly created branch automatically gets upstream configuration. At its default value true, Git sets the upstream only when the new branch starts from a remote-tracking branch; false never does, always does it for local start points too.
What is Git's wire protocol v2, and what does it change about fetching?
basics
~20 sProtocol v2 is Git's second-generation transfer protocol. Instead of the server advertising every ref up front, the client requests only the refs it cares about via ls-refs with ref prefixes, which makes fetches on ref-heavy repositories dramatically cheaper.
In Git, why does pushing to a non-bare repository's checked-out branch fail by default?
basics
~20 sBecause receive.denyCurrentBranch defaults to refuse: moving the branch that a working tree has checked out would leave that tree and index disagreeing with HEAD, so the receiving repository rejects the update. Shared remotes should be bare.
showing 31–35 of 35