GitHub workflow: should every developer have their own fork?
This is the first time our team is using GitHub. We configured it so that we can use it pull requests
as a way to view the code.
- There is a group of organizations, each with rights, and which contains a canonical repo.
- Each developer
forked
runs a group repo and pushes changes to their ownfork
. - Developers submit
pull request
to the repo group when they are ready, and another developer reviews the code and thenpulls
he in.
Is this a sane workflow? My concern is that forked repos are not automatically updated when the group repo is updated. Would it be better if everyone contributed to the group repo? If so, can you use GitHub for easy code viewing?
source to share
Each developer always has their own fork; each clone is a full fork. Collapsing the repo on Github also means that every developer has two forks with a lot of excess push and pull between their local fork and their Github fork.
This has very little meaning. Github forks are great when you expect multiple developers to push and pull, or when you can't just push a branch to the original repo and open a pull request.
In one Github repository, you can open pull requests for branches. Typically, your developers will work locally on a feature branch, push that branch to a shared remote, and then open a Github pull request to merge that branch into master.
source to share