ref
A Git name that points at a commit, such as a branch (refs/heads/main) or a tag (refs/tags/v1.0).
In more detail
Local branches live under refs/heads, remote-tracking branches under refs/remotes, and tags under refs/tags. Each holds one object ID. HEAD is a special ref that usually names another ref rather than an ID.
Example
ls .git/refs/headsRelated terms
- branch — In Git, a movable name for one commit; committing on the branch moves the name forward to the new commit.
- git tag — A name fixed permanently to one commit, usually to mark a release such as v1.0, and the command that creates and lists them.
- github context — The expression object that describes the current run: its event, commit SHA, ref, actor, repository and more.
- remote-tracking branch — A local, read-only record of where a branch on a remote pointed the last time you talked to it, such as origin/main.
- HEAD — Git's pointer to where you are: normally the name of the current branch, and through it the current commit.
- symbolic ref — A ref that holds the name of another ref instead of an object ID, as HEAD normally holds the name of a branch.
Taught in
- Triggers and the Event Model — Continuous Integration & Continuous Delivery Pipelines
- Keyless Authentication: OIDC to the Cloud — Continuous Integration & Continuous Delivery Pipelines
- A Repository Is A Folder With A Memory — Advanced Git Internals & Distributed Workflows
- Committing, And What A Good Message Says — Advanced Git Internals & Distributed Workflows
- A Branch Is A Moving Pointer — Advanced Git Internals & Distributed Workflows
- HEAD, And Why Detached HEAD Is Not An Error — Advanced Git Internals & Distributed Workflows
- Rebase: The Same Work, A Different History — Advanced Git Internals & Distributed Workflows
- Undoing: restore, reset, revert And stash — Advanced Git Internals & Distributed Workflows
- What A Remote Actually Is — Advanced Git Internals & Distributed Workflows
- Amend, And The One Hard Rule — Advanced Git Internals & Distributed Workflows
- Interactive Rebase: Squash, Reorder, Reword — Advanced Git Internals & Distributed Workflows
- The Workflow That Ran On A Stranger's Pull Request — GitHub Actions (GH-200) Exam Prep
- Triggers In Depth: Filters, Schedules And Dispatch — GitHub Actions (GH-200) Exam Prep
- Expressions, Contexts And The If That Is Always True — GitHub Actions (GH-200) Exam Prep
- Matrices, Needs And Concurrency: The Shape Of A Run — GitHub Actions (GH-200) Exam Prep
- Reusable Workflows: Inputs, Secrets And Outputs Across A Call — GitHub Actions (GH-200) Exam Prep
- Outputs, Artifacts, Caches And Job Summaries — GitHub Actions (GH-200) Exam Prep
- Why It Ran, Why It Did Not: Reading Runs, Jobs And Checks — GitHub Actions (GH-200) Exam Prep
- Failed Runs: Debug Logging And Re-Running The Right Jobs — GitHub Actions (GH-200) Exam Prep
- Three Kinds Of Action: JavaScript, Docker Container Or Composite — GitHub Actions (GH-200) Exam Prep
- action.yml: Inputs, Outputs, Runs And Branding — GitHub Actions (GH-200) Exam Prep
- Distributing And Versioning Actions: Tags, SHAs And Marketplace — GitHub Actions (GH-200) Exam Prep
- Governing Actions: Allow Lists, SHA Pinning And Rulesets — GitHub Actions (GH-200) Exam Prep
- Self-Hosted Runners At Scale: Labels, Groups And ARC — GitHub Actions (GH-200) Exam Prep
- Environments: Reviewers, Wait Timers And Deployment Rules — GitHub Actions (GH-200) Exam Prep
- Script Injection: When An Issue Title Becomes Code — GitHub Actions (GH-200) Exam Prep
- OIDC: Cloud Access Without Stored Keys — GitHub Actions (GH-200) Exam Prep
- Supply Chain: Pinning, Trusted Actions And Attestations — GitHub Actions (GH-200) Exam Prep
- Faster And Cheaper: Where The Minutes Go — GitHub Actions (GH-200) Exam Prep
- YAML-Reading Sprint: What Happens When This Runs? — GitHub Actions (GH-200) Exam Prep
- Full Mock And Review: Where Your Points Go — GitHub Actions (GH-200) Exam Prep