HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git update-ref — Git command for creating, updating, and deleting Git refs. More information: <https://git-scm.com/do

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandcligit update-refcreatingupdatingforgit

Problem

How to use the git update-ref command: Git command for creating, updating, and deleting Git refs. More information: <https://git-scm.com/docs/git-update-ref>.

Solution

git update-ref — Git command for creating, updating, and deleting Git refs. 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}}

Code Snippets

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}}

Context

tldr-pages: common/git update-ref

Revisions (0)

No revisions yet.