A git branch.
| Metadata | Value |
|---|
| Plural | branches |
| Subtitle field | commit |
| Field | Type |
|---|
commit | string |
upstream | string |
ahead | integer |
behind | integer |
isCurrent | boolean |
isRemote | boolean |
External standards this shape draws from or aligns with. See Shape design principles for how prior art informs shape design.
- Git Internals — Branches — A branch is a movable pointer to a commit. Our commit field is the HEAD sha; ahead/behind mirror
git rev-list --count.
- GitHub REST — branches — Practical API surface. Our upstream ≈ the remote tracking ref; we flatten protection/commit metadata that GitHub nests.
- git —
list_branches, get_branch