UTHelper is a versioned desktop/mobile application with installed releases that may remain in use simultaneously. The repository therefore uses the Gitflow model for long-lived production and integration branches, adapted to GitHub pull requests.
mainis production-ready. A change reachingmainis a release candidate and is tagged only after the protected release checks pass.developis the integration branch for the next release.feature/*,bugfix/*,fix/*,docs/*,chore/*,refactor/*,perf/*,test/*,ci/*,build/*, andcodex/*branch fromdevelopand return todevelopthrough a pull request.release/*branches fromdevelopwhen a stabilization branch is needed. It merges intomainfor release and back intodevelopfor release-only fixes.hotfix/*branches frommainand merges into bothmainanddevelop.
For the normal release cadence, a stable develop may be promoted directly through
a develop -> main pull request. Do not replace that final promotion with a snapshot
branch, cherry-pick, squash, or rebase.
All protected-branch changes use pull requests and GitHub's Create a merge commit
method. Merge commits are intentional: main and develop live indefinitely, and
the shared ancestry prevents the repeated commits and conflicts caused by squashing
or rebasing one into the other.
Before merge:
- Bring the topic branch up to date without rewriting either protected branch.
- Pass the Gitflow direction check and every required CI/security check.
- Obtain the required fresh CODEOWNER approval and resolve all review threads.
- Use a merge commit; never squash or rebase a PR targeting
mainordevelop. - Delete the short-lived source branch after merge.
Direct pushes, force-pushes, and deletion of main or develop remain blocked. The
owner bypass is limited to pull requests for repository recovery; it is not a license
to bypass failed checks.
Routine release:
- Merge reviewed topic branches into
develop. - Open
develop -> mainand merge it with a merge commit after all checks pass. - Tag the resulting
maincommit through the protected release process.
Hotfix:
- Branch
hotfix/<version>from the affectedmainrelease. - Merge the same hotfix branch into
mainanddevelopthrough separate PRs. - Tag only the protected
mainresult.
If the two long-lived histories ever diverge because a change was independently rebased, squashed, or cherry-picked, reconcile ancestry before the next release. Do not force one protected branch to the other or fabricate an unrelated snapshot PR.
The Protected main and develop ruleset:
- requires PRs, one fresh CODEOWNER approval, resolved threads, and strict status checks;
- allows only merge commits;
- blocks branch deletion and non-fast-forward updates;
- deliberately does not require linear history, because that rule prohibits merge commits.
Audit the live settings with:
python scripts/github_branch_policy.py audit --owner-actor-id 106900882Applying policy additionally requires the exact repository confirmation shown by the
CLI help. The script uses bounded gh api requests and never handles repository
secrets.