Everyone at Thoth Tech has permission to create new GitHub repositories. To adhere to the Git Contribution guide, we suggest to implement the following GitHub settings:
You can find these settings under the repository settings page.
This setting helps to reduce the number of branches that are already merged to the default branch. On large repository, this improves code checkout time and reduce disk storage.
Settings > General
page. For example,
https://github.com/thoth-tech/handbook/settings
.After pull requests are merged, you can have head branches deleted automatically.
setting.Automatically delete head branches
.To reduce accidental deletion and risk of compromised accounts, we would like to keep elevated permissions to a smallest number of individual as possible. Generally, roles are assigned as follows:
Admin
Maintain
Write
The administrators or repository creators can ensure the above roles assignment.
Settings > Access
page. For example,
https://github.com/thoth-tech/handbook/settings/access
.Add teams
.We recommend feature branch strategy and Pull request workflow for code development. This ensures code quality, knowledge sharing and collaboration. Pushing to the default branch must be prohibited.
Settings > Branches
page. For example,
https://github.com/thoth-tech/handbook/settings/branches
.Add rule
.Branch name pattern
text box. For example, main
.Require a pull request before merging
.
Require approvals
.Required number of approvals before merging
according to the
Code Review guidelines.Require status checks to pass before merging
.
Requires branches to be up to date before merging
is disabled.Include administrators
so everyone is subjected to the above rules when contributing.
code to the repository.Create
.