# `Git.Commands.Version`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/commands/version.ex#L1)

Implements the `Git.Command` behaviour for `git --version`.

Reports the installed git version, useful for gating on capabilities.

# `t`

```elixir
@type t() :: %Git.Commands.Version{}
```

# `args`

```elixir
@spec args(t()) :: [String.t()]
```

Returns the argument list for `git --version`.

## Examples

    iex> Git.Commands.Version.args(%Git.Commands.Version{})
    ["--version"]

# `parse_output`

```elixir
@spec parse_output(String.t(), non_neg_integer()) ::
  {:ok, Git.Version.t()} | {:error, {String.t(), non_neg_integer()}}
```

Parses the output of `git --version` into a `Git.Version` struct.

On a non-zero exit code, returns `{:error, {stdout, exit_code}}`.

---

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