Function: magit-get-current-branch

magit-get-current-branch is a natively compiled function defined in magit-git.el.

Signature

(magit-get-current-branch)

Documentation

Return the refname of the currently checked out branch.

Return nil if no branch is currently checked out.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-git.el
(defun magit-get-current-branch ()
  "Return the refname of the currently checked out branch.
Return nil if no branch is currently checked out."
  (magit-git-string "symbolic-ref" "--short" "HEAD"))