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}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.