Thanks for helping build this community resource! Every improvement helps future learners. Goal: high-quality, searchable interview Q&A—organized by week—with consistent metadata.
- Prerequisites
- First-Time Setup (once)
• Step 1 — Fork & Authenticate
• Step 2 — Clone Your Fork Locally
• Step 3 — Install deps & Pre-commit Hook - Your First PR (end-to-end)
- Every PR: Quick Checklist
- Keeping Your Fork in Sync
- Answer Structure & Frontmatter
- Commit & PR Conventions
- Reviews, Governance & FAQ
- Git (with SSH or HTTPS set up)
- Python 3.11+
- Bash (Git Bash on Windows is fine)
Why: Contributors run two scripts locally to validate metadata and rebuild the index.
Don’t edit .github/** or scripts/**. If you need something changed there, open an issue or propose the change under meta/proposals/ and maintainers will apply it.
-
Fork the repo: https://github.com/pravinmishraaws/devops-micro-internship-interviews
-
Authenticate Git SSH (recommended):
ssh-keygen -t ed25519 -C "your.email@example.com" eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519
Add
~/.ssh/id_ed25519.pubto GitHub → Settings → SSH and GPG keys.Force SSH for GitHub (avoids HTTPS prompts):
git config --global url."git@github.com:".insteadOf "https://github.com/"
HTTPS (alternative):
git config --global credential.helper cache
-
Test:
ssh -T git@github.com
Expected: greeting from GitHub.
git clone git@github.com:yourusername/devops-micro-internship-interviews.git
cd devops-micro-internship-interviews
git remote -vAdd the original repo as upstream:
git remote add upstream https://github.com/pravinmishraaws/devops-micro-internship-interviews.git
# Now, check remote again
git remote -vWhy: You’ll pull updates from
upstreamand push your work toorigin(your fork).
Create a virtualenv and install deps:
macOS / Linux
python -m venv .venv && source .venv/bin/activate
pip install -r scripts/requirements.txtWindows (PowerShell)
py -m venv .venv
. .\.venv\Scripts\Activate.ps1
pip install -r scripts\requirements.txt[Mac, Linux user ] Create scripts/setup.sh (commit this file to repo) and include the pre-commit hook installer:
#!/usr/bin/env bash
set -euo pipefail
# Create venv if missing
if [ ! -d ".venv" ]; then
python -m venv .venv
fi
# Activate venv (POSIX shells)
# shellcheck source=/dev/null
source .venv/bin/activate || true
# Fallback for Git Bash on Windows
if [ ! -n "${VIRTUAL_ENV-}" ] && [ -f ".venv/Scripts/activate" ]; then
# shellcheck disable=SC1091
. .venv/Scripts/activate
fi
pip install -r scripts/requirements.txt
# Install pre-commit hook
HOOK_PATH=".git/hooks/pre-commit"
echo "Setting up pre-commit hook..."
cat > "$HOOK_PATH" <<'EOF'
#!/bin/bash
echo "🧹 Running pre-commit validation..."
python scripts/validate_frontmatter.py || exit 1
python scripts/build_index.py || exit 1
echo "✅ Validation passed!"
EOF
chmod +x "$HOOK_PATH"
echo "✅ Pre-commit hook installed successfully!"[ Windows User ] helper (scripts/setup.ps1) for PowerShell users:
$ErrorActionPreference = "Stop"
if (-not (Test-Path ".venv")) {
py -m venv .venv
}
. .\.venv\Scripts\Activate.ps1
pip install -r scripts\requirements.txt
$hookPath = ".git/hooks/pre-commit"
@"
#!/bin/bash
echo "🧹 Running pre-commit validation..."
python scripts/validate_frontmatter.py || exit 1
python scripts/build_index.py || exit 1
echo "✅ Validation passed!"
"@ | Out-File -FilePath $hookPath -Encoding ascii -NoNewline
bash -lc "chmod +x $hookPath"
Write-Host "✅ Pre-commit hook installed successfully!"Run it once:
bash scripts/setup.shNow every commit will auto-run:
python scripts/validate_frontmatter.pyandpython scripts/build_index.pyand block bad commits.
- Sync main (fast-forward only)
git fetch upstream
git checkout main
git pull --ff-only upstream main- Create a feature branch
git checkout -b Q####-kebab-title- Add your question
- Path:
weeks/<week>/questions/ - File:
Q####-kebab-title.md - Include frontmatter and sections (see below)
- Run validators manually (optional)
python scripts/validate_frontmatter.py && python scripts/build_index.py- Commit (pre-commit will auto-validate)
git add weeks/<week>/questions/Q####-kebab-title.md
git commit -m "question(Q0401): add IAM role vs user with pitfalls and refs"- Push & open PR
git push -u origin Q####-kebab-titleOn GitHub → Compare & pull request.
Base: pravinmishraaws/main • Compare: yourusername/Q####-kebab-title
- Fill PR description
- What you added, which week, validation passed, any notes
-
One question per file →
weeks/<week>/questions/Q####-kebab-title.md -
Frontmatter includes:
id, title, difficulty, week, topics, tags, author, reviewed -
Structure: Short Answer → Deep Dive → Pitfalls → References
-
Run locally (auto via pre-commit) or manually:
python scripts/validate_frontmatter.py && python scripts/build_index.py -
Rebase on main before pushing
-
Cite sources; avoid plagiarism
Why: CI runs the same checks—passing locally saves reviewers’ time.
Before you start or when PRs merge:
git fetch upstream
git checkout main
git pull --ff-only upstream main
git checkout Q####-kebab-title
git rebase main
# If conflicts: fix -> git add <files> -> git rebase --continue
# If you rewrote history:
git push --force-with-lease origin Q####-kebab-titleWhy: Linear history keeps diffs clean and reviews fast.
---
id: Q0001
title: OSI vs TCP/IP — what’s the practical difference?
difficulty: entry # one of: entry | easy | medium | hard | expert
week: 00
topics: [networking, models]
tags: [networking, osi, tcpip]
author: yourgithubusername
reviewed: false
---Tip: id number must match the file name (Q0001-…md).
## Short Answer
2–4 sentences an interviewer could accept.
## Deep Dive
Context, trade-offs, examples, diagrams if helpful, commands.
## Pitfalls
Common mistakes and how to avoid them.
## References
- Official docs
- High-quality blogs, RFCs, whitepapersConventional Commit examples:
question(Q0401): add IAM role vs user
docs: improve contributing guide with pre-commit hook
chore: fix build index path
PR title:
question(Q0401): add IAM role vs user with pitfalls and references
PR description:
- What changed (week, file)
- Validation passed locally
- Any reviewer notes
Reviews & Governance
- PRs require CODEOWNERS approval for the week you changed
- CI enforces metadata/formatting; blocked PRs must be fixed and re-pushed
- High-quality answers are later marked
reviewed: true
Common Pitfalls
| Issue | Fix |
|---|---|
id doesn’t match file name |
Rename file or update id to match |
| Missing frontmatter field | Copy template again; run validator |
| Multiple questions in one PR | Split into separate PRs |
| Failing CI | Run both scripts locally; read the error output |
FAQ
- Can I update an existing answer? Yes—explain the change in your PR.
- Can I submit multiple questions in one PR? Prefer one per PR.
- Do I need SSH? Recommended. HTTPS works with cached credentials.
Code of Conduct Be respectful and constructive. Disagreements are fine—disrespect isn’t.
Your contributions help hundreds of learners practice confidently. 🙌