⚡ ~/naveed Interview Prep
⚡ Portfolio Home 👤 About Naveed Bio & Credentials 📫 Contact Naveed Get In Touch ✍️ Engineering Blog Deep Dives 🎯 Interview Hub 1,000+ Scenarios ☸️ Kubernetes Mastery Hub 24 Modules 🎮 DevOps Arcade & Quizzes Subnet Blitz ⚡ 🗺️ DevOps Roadmaps PDFs & Guides 🤖 Morpheus Analysis AI Quant ↗ 🛠️ Developer Tools Utilities 🧪 Labs & Experiments 📄 Interactive CV & Certs 🔗 All Links & Socials ⚡ Join The Dispatch (Weekly SRE Newsletter) →
← Back to All Git & Branching Workflows Interview Questions Scenario 48 of 52 in Git & Branching Workflows
Staff SRE / Principal Architect [L3] Git Amend without editing message Staff SRE Scenario [L3]
🎯 Target Role / Context: Git Scenario #48 (L3) · Amend without editing message

Q: You're setting up a Git server for an organization. What are the differences between the four transfer protocols Git supports (Local, HTTP, SSH, Git), and which would you choose?

Git supports four protocols for communication between client and server:

#Git #L3 #Version Control #Collaboration
🎙️ Candidate Opening & Architectural Context
""Git is an immutable directed acyclic graph (DAG); knowing commands like git reflog means you never truly lose commits. The interviewer is testing: Understanding of Git transport protocols and security considerations.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third.""
Advertisement
⚡ Recommended Practice Lab

Want to master this scenario in a live sandbox? KodeKloud's Advanced Git Workflows, Rebase & Interactive Diagnostics covers this exact problem with hands-on terminal drills.

🛠️ Production Runbook & Step-by-Step Resolution

Direct Answer: "Git is an immutable directed acyclic graph (DAG); knowing commands like git reflog means you never truly lose commits. The interviewer is testing: Understanding of Git transport protocols and security considerations.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."

1️⃣

Initial Diagnostics & Root Cause Analysis

Git supports four protocols for communication between client and server:

  • Uses the filesystem directly. No network, no authentication beyond filesystem permissions.
  • Fast, simple, but only works on the same machine or NFS mounts.
  • Use case: shared server with SSH access where repos live on a mounted filesystem.
  • Runs over standard HTTP(S) — passes through firewalls, proxies, and load balancers.
  • Authentication via username/password, tokens, or SSO.
  • Smart HTTP (default since Git 1.6.6) negotiates only needed objects — efficient as SSH.
  • Recommended for most organizations — works everywhere, supports all auth methods, TLS for encryption.
  • Encrypted, authenticated via SSH keys. No anonymous access possible.
2️⃣

Remediation & Permanent Safeguards

1. Local protocol (file:// or just a path): 2. HTTP/HTTPS (Smart HTTP): 3. SSH: 4. Git protocol (git://): For a new organization: Smart HTTPS with token-based authentication (PATs or OAuth via SSO). It works through corporate proxies, supports granular permissions via the hosting platform, and uses TLS. SSH as a secondary option for developers who prefer it. Never use the raw Git protocol.

git clone /srv/git/repo.git
  • Well-understood security model; keys can be centrally managed (LDAP, SSO-issued certificates).
  • No built-in authorization granularity — you either have shell access or you don't. Tools like Gitolite or platform features (GitHub, GitLab) add per-repo/per-branch authorization on top.
  • Best for: internal teams where everyone has SSH keys, and you want simplicity without HTTP infrastructure.
  • Unauthenticated, unencrypted, read-only by convention. Runs on port 9418.
  • Fastest protocol (no encryption overhead), but no security.
  • Almost never used today. Was useful for public read-only mirrors; HTTPS has replaced it.
💡 The Senior SRE Gold Nugget (Key Architectural Takeaway)
"Pro-Tip: Uses the filesystem directly. No network, no authentication beyond filesystem permissions.."
⚡ 60-Second Elevator Pitch Talking Points
  • Uses the filesystem directly. No network, no authentication beyond filesystem permissions.
  • Fast, simple, but only works on the same machine or NFS mounts.
  • Use case: shared server with SSH access where repos live on a mounted filesystem.
⛔ Critical Candidate Mistakes to Avoid in This Scenario

Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:

  1. Running raw git push --force rather than git push --force-with-lease on shared team feature branches when configuring Youre setting server git push --force unconditionally overwrites remote commits made by teammates, whereas --force-with-lease aborts if the remote ref was updated.
  2. Resolving complex merge conflicts with blind checkout overwrite strategies without running unit tests when configuring Youre setting server Unilateral conflict resolution frequently clobbers complementary logic introduced in parallel feature branches, creating regression bugs.
  3. Discarding corrupted working directories prematurely instead of recovering lost state using git reflog when configuring Youre setting server git reflog tracks every HEAD movement, allowing instant recovery of discarded commits, botched rebases, or deleted local branches.
  4. Disabling branch protection rules and mandatory PR approval reviews on shared release branches when configuring Youre setting server Without branch protection, developers can bypass CI validation gates and push untested code directly to production branches.
Advertisement
Want more Git & Branching Workflows scenarios?
Explore our complete collection of scenario-based Git & Branching Workflows interview runbooks.
Browse All Git & Branching Workflows Questions →