Version: v2.8.0
GitHub Workflow
This guide covers the end-to-end Git and GitHub workflow for contributing to HAMi. It applies to both the HAMi core repository and the documentation website.

Fork and cloneâ
Fork the target repository on GitHub, then clone your fork locally:
export user="your-github-username"
# For HAMi core
git clone https://github.com/$user/HAMi.git
cd HAMi
git remote add upstream https://github.com/Project-HAMi/HAMi.git
git remote set-url --push upstream no_push
# For the docs website
git clone https://github.com/$user/website.git
cd website
git remote add upstream https://github.com/Project-HAMi/website.git
git remote set-url --push upstream no_push
Verify your remotes:
git remote -v
Expected output:
origin https://github.com/<your-username>/HAMi.git (fetch)
origin https://github.com/<your-username>/HAMi.git (push)
upstream https://github.com/Project-HAMi/HAMi.git (fetch)
upstream no_push (push)
The no_push setting prevents accidental pushes to the upstream repository.
Keep master in syncâ
Before starting any new work, sync your local master with upstream:
git fetch upstream
git checkout master
git rebase upstream/master
Use rebase, not merge. Merge commits clutter the history and make it harder to cherry-pick fixes.
Create a branchâ
Branch off master with a short, descriptive name:
git checkout -b fix/gpu-memory-calculation
git checkout -b feat/kunlunxin-multi-card
git checkout -b docs/update-ascend-guide
Work entirely on this branch. Do not commit directly to master.