tldr/pages/common/git-update-ref.md

13 lines
317 B
Markdown
Raw Normal View History

2020-10-01 19:58:34 +01:00
# git update-ref
2021-01-07 14:06:38 +00:00
> Git command for creating, updating, and deleting Git refs.
2020-10-01 19:58:34 +01:00
> More information: <https://git-scm.com/docs/git-update-ref>.
- Delete a ref, useful for soft resetting the first commit:
`git update-ref -d {{HEAD}}`
- Update ref with a message:
`git update-ref -m {{message}} {{HEAD}} {{4e95e05}}`