### Method

# Ggit Repository get_head

#### Declaration [src]

    GgitRef*
    ggit_repository_get_head (
      GgitRepository* repository
      GError** error
    )

#### Description [src]

Get and resolves the current HEAD reference of the repository. Note that the returned ref is already resolved (if HEAD is symbolic). If you want to retrieve the symbolic ref called HEAD, then use #ggit_repository_lookup_reference instead.

Gets property | `Ggit.Repository:head`

#### Return value

Type: `GgitRef`

A `GgitRef`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.