Store a reference by name, including a message with a reason for the update

git symbolic-ref

  • Read, change, or delete files that store references.
    More information: <https://git-scm.com/docs/git-symbolic-ref>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git symbolic-ref -m "{{message}}" refs/{{name}} refs/heads/{{branch_name}}

click the source code to copy install git symbolic-ref on any operating system with command-not-found.com