1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Files
docs/content/rest/git/refs.md
2025-01-22 11:12:58 +00:00

22 lines
967 B
Markdown

---
title: REST API endpoints for Git references
shortTitle: References
intro: >-
Use the REST API to interact with references in your Git database on {% data
variables.product.github %}
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
ghes: '*'
topics:
- API
allowTitleToDifferFromFilename: true
autogenerated: rest
---
## About Git references
A Git reference (`git ref`) is a file that contains a Git commit SHA-1 hash. When referring to a Git commit, you can use the Git reference, which is an easy-to-remember name, rather than the hash. The Git reference can be rewritten to point to a new commit. A branch is a Git reference that stores the new Git commit hash. These endpoints allow you to read and write [references](https://git-scm.com/book/en/v2/Git-Internals-Git-References) to your Git database on {% data variables.product.github %}.
<!-- Content after this section is automatically generated -->