1 min read
GitHub
Last Updated - Platform 21.0 - SDK 16.0At Poq we use GitHub to host our repositories.
Set up a new repository
- After creating your repository locally, open GitHub in your browser.
- Tap on the Create New repository button.
- Select the correct owner (this should be your organisation, e.g.
poqcommerce
). - Set the name to match your apps name.
For Poq clients we use the following naming Poq.iOS.ClientName
.
- Set the repository to Private.
- Tap Create Repository to finish.
- From your local repository set the remote to your new repository, e.g.
https://github.com/poqcommerce/Poq.iOS.ClientName
. - Push the repository up as the
dev
andmaster
branches (or matching your desired branch strategy).
You have done the initial GitHub setup for your app.
Set up branch protection
- Set up your CI and run your PR validation pipeline once so that you can set up your branch protection. Check out our Azure DevOps strategy document.
- On GitHub head to your repository Settings then Branches.
- Make sure the default branch is set to
dev
(if using GitFlow). - Tap Add rule, set the following rules then Save changes for each branch name pattern:
- For
master
use:- Requires status checks to pass before merging.
- Add your PR validation pipeline as a status check.
- Requires status checks to pass before merging.
- For
dev
use:- Require a pull request before merging.
- Require approvals (1 review).
- Requires status checks to pass before merging.
- Require branches to be up to date before merging.
- Add your PR validation pipeline as a status check.
- Require a pull request before merging.
- For
release/*
andhotfix/*
use:- Require a pull request before merging.
- Require approvals (1 review).
- Requires status checks to pass before merging.
- Require branches to be up to date before merging.
- Add your PR validation pipeline as a status check.
- Allow deletions.
- Require a pull request before merging.
You have set up branch protection.
Set up developer access
- On GitHub head to your repository Settings then Manage access.
- Tap on Add teams and set the access for each of the following:
- For
ios-admin
useAdmin
. - For
ios-developer
useWrite
. - For
ios-reader
useRead
. - For parters we have
ios-{partner}
teams that should useRead
orWrite
access depending on involvement.
- Remove yourself from the list.
You have provided other developers with access.
Next steps
- Check out our branching strategies.