New Repository
Create New GitHub Repository
Use these steps to create an entirely new git repository in GitHub. All code stored in GitHub should be within the Hakai Institute organization. This applies to everything from collections of scripts to app development.
- Login to github.com
- Join the github.com/hakaiinstitute organization (email data@hakai.org)
- Click on the '+' sign (upper right corner)
- Select New Repository
- Change the Owner to HakaiInstitute to create this repo within Hakai
- Enter a repository name (the convention is to use all lowercase separated by hyphens)
- Keep visibility Public unless this project will contain sensitive data
- Important: Set the template to HakaiInstitute/hakai-dataset-repository-template1
- Important: Set Include all branches to On2
- Click Create repository
Branch Protection Rules - recommended
By protecting your main branch from certain actions, you will:
- Reduce time spent troubleshooting and repairing your repository
- Help new collaborators follow your team's workflows
- Create a clean source of truth that is buffered from untested changes
- Prepare for adding automation
Here is how to add a simple protection rule for your main branch:
- Open your repository in GitHub
- Click Settings (far right)
- Click Rules > Rulesets
- Click New ruleset > New branch ruleset
- Give it a name like "Protect Main Branch"
- Change Enforcement status to Active
- Click Add target under Target branches
- Click Include default branch
- Scroll down and check Require a pull request before merging
- (Recommended) Restrict the Allowed merge methods - contact data@hakai.org to discuss options
- Scroll to bottom and click the Create button
After creating a repository, you can Clone the repo to your computer to work on it.
-
The 'hakai-dataset-repository-template' includes some initial built-in documentation to help you get started as well as many common defaults like the CC-BY-4.0 License, recommended project structure, and automation that helps new data packages find their way to the Hakai Data server. (See Mobilization > GitHub) ↩
-
Including the default starter branches from the template allows the built-in automation to run, matches recommended best practices for git flow, and enables the Data Mobilization team to help you effectively manage your data. ↩