A collection of tools that I use.
toolbelt git append needs --task only for repos owned by an employer org:
- The owner is read from the
originremote (git@github.com:owner/repo.gitorhttps://github.com/owner/repo). - Employer orgs are
tasks.employer_orgsin~/.config/toolbelt/config.yaml(default[dbt-labs, fivetran], case-insensitive). - Any other owner is personal:
--taskis optional, and when given it is stored as usual. - No
origin, or one that is not a github.com URL, keeps the requirement. IS_PERSONAL=truewaives it everywhere.tt uilists a personal repo only whenIS_PERSONAL=true; elsewhere it shows work repos alone (a repo with no github.comorigincounts as work).
Each branch merges its tracked parent, then its own origin/<branch>. The top branch of a stack has no tracked
parent: it merges origin/<base> only when that merge would conflict with a branch in the stack, so clean base
changes stay out. toolbelt git sync --merge-base-branch always merges origin/<base> into the top branch first.
Both run the same sync, which pushes with upstream tracking (git push -u), never forced:
- A branch in a tracked stack: when it has children, when origin does not have it yet (a new branch is published), when it is strictly ahead of origin, or when it is a leaf with an open PR and something new.
- A branch not in a tracked stack: published if origin lacks it, except a work repo's default branch.
- In a personal repo (GitHub owner outside
tasks.employer_orgs, orIS_PERSONAL=true), an untracked branch origin already has, includingmain, is also fast-forwarded. If it diverged from origin nothing is pushed and the command stops with an error. - Not pushed: a work repo's
main(or other default branch), and its other untracked branches origin already has.