Elena' s AI Blog

Collaboration in GitHub

10 Jun 2022 (updated: 17 Aug 2026) / 10 minutes to read

Elena Daehnhardt


Jasper AI-generated art, January 2023


TL;DR:
  • Collaborate on GitHub: fork repos you don't own, use branches for features, create pull requests for code review. Small teams can share repos directly—use PRs for review.

Previous: Part 3 — Storing Your Local Project to GitHub

Next: Part 5 — Leveraging Git Tags

Git Collaboration on GitHub: Forks, Branches, and Pull Requests

GitHub collaboration is the practice of contributing to shared or third-party repositories using Git’s distributed workflow: you fork a repository (copy it to your own account), create a branch for your changes, then open a pull request so the maintainer can review and merge them. Small teams with write access can skip forking and collaborate directly on branches within a shared repository.

In my post “GIT in 10 minutes”, I have covered the basics of Git setup and a few workflow commands to get started with using Git (version control system). As promised, I will go into the topic of how to use Git for collaborative work. Mainly, I will focus on contributions to other repositories, for instance, open-source or projects of your colleagues and friends. Let’s go!

GitHub Collaboration Models: Forking vs Shared Repository

As explained in GitHub documentation, GitHub supports two ways of collaborative work:

  1. Forking. You create a repository fork, which essentially copies a repository to your own GitHub account. You do not need to have any permissions for the copied repository. The repository owner can accept your pull request and merge your changes into the original repository.
  2. Shared repository. In small teams, you can add project collaborators, who usually work on their own branches and push their contributions directly. Pull requests still let you review the code and comment on proposed changes before merging.

Forking and Pull Requests: Step-by-Step Git Workflow

🔒 Subscribe to keep reading.

Syncing Your Fork with the Upstream Repository

🔒 Subscribe to keep reading.

Shared Repository

🔒 Subscribe to keep reading.

Conclusion: GitHub Collaboration Workflow Summary

🔒 Subscribe to keep reading.

References

🔒 Subscribe to keep reading.

Subscribe to unlock the full article ❤️

The form below signs you up for the newsletter. It does not log you into the app — log in afterwards (same email) to unlock this article and download your subscriber gifts. New subscribers get an inbox mail: Set a password to unlock articles.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.

Citation
Elena Daehnhardt. (2022) 'Collaboration in GitHub', daehnhardt.com, 10 June 2022. Available at: https://daehnhardt.com/blog/2022/06/10/git-collaboration-branching-forking-pull-requests-issues/
All Posts