Github Contribution Guide¶
This guide outlines our github contribution process for our NZ Solar Map project.
Prerequisites¶
- Familiarity with the command line and git.
- You've cloned our git repository.
Workflow¶
graph TD
subgraph "GitHub (Remote)"
GMain[(Repoository)]
subgraph "GitHub Web UI"
GFeature(Remote Branch)
PR[Review & CI Checks]
Merge[Merge]
end
end
subgraph "Local Computer"
LMain(Local Sync)
LFeature(Working Branch)
Test[Develop & Test]
end
%% Workflow
GMain -- "git pull main" --> LMain
LMain -- "git checkout -b feature" --> LFeature
LFeature --> Test
Test --> LFeature
LFeature -- "git push feature" --> GFeature
GFeature --> PR
PR -- "Approval" --> Merge
Merge --> GMain
Summary of Steps¶
- Branch Strategy:
- Develop in git branches. Don't git push to
main. git pull origin mainbefore you start.- Push your branch to GitHub.
- Develop in git branches. Don't git push to
- GitHub Web UI:
- Open Pull Request on GitHub.
- Wait for Automated Tests - Green Check.
- Request review.
- Note: For low-impact documentation changes, you may proceed without a review.
- Merge.
Location of Settings¶
Rules for our workflow are found in :
- Branch Protection Rules:
Settings>Branches>Branch protection rules. - Actions & CI/CD Settings:
Settings>Actions>General. - Collaborators & Teams:
Settings>Collaborators and teams.
Admin Access Required
Only users with Admin permissions can see the Settings tab. If you cannot see it, contact the repository owner to update your permission level.