# `Dagger.GitRef`
[🔗](https://github.com/dagger/dagger/blob/v0.20.5/sdk/elixir/lib/dagger/gen/git_ref.ex#L2)

A git ref (tag, branch, or commit).

# `t`

```elixir
@type t() :: %Dagger.GitRef{client: term(), query_builder: term()}
```

# `commit`

```elixir
@spec commit(t()) :: {:ok, String.t()} | {:error, term()}
```

The resolved commit id at this ref.

# `common_ancestor`

```elixir
@spec common_ancestor(t(), t()) :: t()
```

Find the best common ancestor between this ref and another ref.

# `id`

```elixir
@spec id(t()) :: {:ok, Dagger.GitRefID.t()} | {:error, term()}
```

A unique identifier for this GitRef.

# `ref`

```elixir
@spec ref(t()) :: {:ok, String.t()} | {:error, term()}
```

The resolved ref name at this ref.

# `tree`

```elixir
@spec tree(t(), discard_git_dir: boolean() | nil, depth: integer() | nil) ::
  Dagger.Directory.t()
```

The filesystem tree at this ref.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
