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

You want to contribute a fix to an open-source project you do not have write access to.

BeginnerScenarioRemotes, Collaboration and Pull Requests
Answer

Situation read → The standard path is fork, branch, pull request.

What I'd do →

  1. Fork on GitHub: gh repo fork OWNER/REPO --clone.
  2. git switch -c fix/typo-in-readme.
  3. Commit following the project's CONTRIBUTING.md (sign-off, tests, style).
  4. git push -u origin fix/typo-in-readme, then gh pr create.

Why → You push to your fork and the PR proposes the merge into the upstream repo.

Interview tip → Read the contribution guide and open an issue first for larger changes.

All Git & GitHub questions Roadmap: Git & GitHub

More on Remotes, Collaboration and Pull Requests