GIT-UPDATE-REF(1) Git Manual GIT-UPDATE-REF(1) (NAME) git-update-ref - (SYNOPSIS) git update-ref [-m ] [--no-deref] -d [] git update-ref [-m ] [--no-deref] [--create-reflog] [] git update-ref [-m ] [--no-deref] --stdin [-z] [--batch-updates] (DESCRIPTION) (symbolic refs) (dereference) . git update-ref HEAD . ( ). git update-ref refs/heads/master master . "0" . ( git-symbolic-ref(1) ). git update-ref --stdin symref-* . --no-deref . -d . --stdin update-ref . : update SP SP [SP ] LF create SP SP LF delete SP [SP ] LF verify SP [SP ] LF symref-update SP SP [SP (ref SP | oid SP )] LF symref-create SP SP LF symref-delete SP [SP ] LF symref-verify SP [SP ] LF option SP LF start LF prepare LF commit LF abort LF --create-reflog update-ref reflog . --batch-updates update-ref (batch) . -- I/O -- . : rejected SP ( | ) SP ( | ) SP LF C . "0" . (SP) . -z NUL : update SP NUL NUL [] NUL create SP NUL NUL delete SP NUL [] NUL verify SP NUL [] NUL symref-update SP NUL [NUL (ref NUL | oid NUL )] NUL symref-create SP NUL NUL symref-delete SP [NUL ] NUL symref-verify SP [NUL ] NUL option SP NUL start NUL prepare NUL commit NUL abort NUL "0" . . . : update ( ). / . create . . delete ( ) . . symref-update ( ). . verify . . symref-create . symref-delete ( ) . symref-verify . . no-deref . option . no-deref . start . (abort) . . prepare . . . commit . abort . . . . (LOGGING UPDATES) "core.logAllRefUpdates" true "refs/heads/" "refs/remotes/" "refs/notes/" HEAD ORIG_HEAD "$GIT_DIR/logs/" git update-ref "$GIT_DIR/logs/" ( ) . : oldsha1 SP newsha1 SP committer LF "oldsha1" "newsha1" "committer" . -m: oldsha1 SP newsha1 SP committer TAB message LF "message" -m . ( ). (NOTES) . . "refs/" ( ). (SEE ALSO) git-symbolic-ref(1) (GIT) git(1) Git 2.55.0 2026-06-29 GIT-UPDATE-REF(1)