HEAD

HEAD is Git's pointer to your checked-out commit, the old name for Drupal core's development line, and an HTTP request that returns headers only.

Learn DrupalDrupal glossary

Which HEAD you meet depends on where you read it. In a terminal or a Git client, HEAD is the branch or commit you have checked out. In older Drupal issues and commit messages, "on HEAD" means the branch that took new core development. In server logs, monitoring and caching, HEAD is the HTTP method that asks for a page's headers without its body.

HEAD in Git

Drupal's code lives in Git repositories on Drupal.org. The Git glossary defines HEAD as the current branch: your working tree comes from the state HEAD refers to. HEAD normally points at a branch. When you check out something that is not a branch tip, such as a tag, it points straight at that commit, and Git calls this a detached HEAD.

New commits made while detached are referenced only by HEAD. When you switch to a branch, nothing refers to them any more, and Git eventually removes them unless you first create a branch or tag at that point.

HEAD in Drupal's history

In Drupal contributor talk, "HEAD" meant the branch that took new development. A Drupal.org policy issue calls it the "logical HEAD" and notes that it moved with each release cycle. Drupal later opened an interim 11.x branch for this role. Since 15 January 2026, the official development branch of Drupal core is main, where Drupal 12 work happens, and 11.x stays for Drupal 11 issues. There is no branch named HEAD to check out.

HEAD as an HTTP request

A HEAD request returns the headers a GET request would return, with no body. Tools use it to read a page's status and headers, such as its size, without downloading the page. From a terminal:

curl --head https://example.com/

Drupal handles this in routing. When a route is restricted to GET, the route method filter also allows HEAD, which its code comment describes as a GET that does not return the body. The request policy of the page cache does not deny HEAD, because it treats GET and HEAD as the cacheable methods.

Do not confuse any of this with the HTML <head> element. Drupal's html.html.twig template outputs it and fills it with the page title, styles and scripts.

Common mistakes

  • Committing on a detached HEAD. The work has no branch. Create one before you switch away, for example with git switch -c my-fix.
  • Assuming a HEAD check is cheap for the server. Drupal sends it to the same route as a GET request, so do not count on it costing less.

For marketing and content teams

When a developer says a fix is "on HEAD" or "on main", it is in the development code and not yet in a release you can install. Tools that only need a page's status or headers can send HEAD requests, so these show up in server logs although no page content was sent.

Sources

Questions about HEAD

Yes, until Git's garbage collection deletes them. The Git manual says to find the commit's name with git reflog, for example git reflog -2 HEAD, and then create a branch or tag that points at it.

Since 15 January 2026 it is main, where Drupal 12 development happens. The 11.x branch remains for issues specific to Drupal 11. Contributors no longer need to know the current development version number.

Yes. When a route is restricted to GET, Drupal's route method filter also allows HEAD, which it treats as a GET that returns no body. A HEAD response carries the headers a GET would, so a tool can check a page's status and headers without downloading it.

Related terms

All Drupal terms from A to Z