Interview Prep/Git & GitHub/Remotes, Collaboration and Pull Requests

A new developer joins. What Git setup do you walk them through on day one?

BeginnerScenarioRemotes, Collaboration and Pull Requests
Answer

Situation read → Good defaults prevent a pile of avoidable mistakes.

What I'd do →

  1. Identity: git config --global user.name and user.email matching their GitHub account.
  2. Auth: SSH key or gh auth login; add the key to GitHub.
  3. Sane defaults: init.defaultBranch main, pull.rebase true, fetch.prune true, rerere.enabled true.
  4. Commit signing, editor, and the team's PR template and branching rules.
  5. Clone and run the repo's bootstrap script (hooks installed by pre-commit install or similar).

Why → Identical defaults across the team means fewer "works on my machine" Git problems.

Interview tip → Keep this in an onboarding doc in the repo, not in people's heads.

All Git & GitHub questions Roadmap: Git & GitHub

More on Remotes, Collaboration and Pull Requests