I am trying to understand what is the difference between the two. The Shared repository model: uses ‘topic’ branches, which are reviewed, approved, and merged into the main branch.

Fork and pull model: a repo is forked, changes are made, a pull request is created, the request is reviewed, and if approved, merged into the main branch.

Can someone explain with example?

1 Answer 1


The most obvious difference is the permissions model. With forking, you don't have to grant someone access to your repository. In open source communities, this is a huge benefit. Within an organization, this becomes less of an issue.

With a branching model, keep in mind branches are still a part of your repository. Example, someone creates a branch, and pushes a large file to their branch, that can have performance impacts on your repo. If a secret is pushed to a branch, that is exposed in your repository.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.