# `Git.Config`
[🔗](https://github.com/joshrotenberg/git_wrapper_ex/blob/main/lib/git/config.ex#L1)

Configuration for the git CLI wrapper.

Holds the path to the git binary, working directory, environment variables,
and timeout settings used when executing git commands.

# `t`

```elixir
@type t() :: %Git.Config{
  binary: String.t(),
  env: [{String.t(), String.t()}],
  timeout: pos_integer(),
  working_dir: String.t() | nil
}
```

# `base_args`

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

Returns the base arguments for all git commands.

Git does not require any global flags, so this returns an empty list.

# `cmd_opts`

```elixir
@spec cmd_opts(t()) :: keyword()
```

Builds the options keyword list for `System.cmd/3`.

Includes `:cd`, `:env`, and `:stderr_to_stdout` based on the config.

# `find_binary`

```elixir
@spec find_binary() :: String.t()
```

Finds the git binary on the system.

Checks the `GIT_PATH` environment variable first, then falls back to
`System.find_executable("git")`.

Raises if git cannot be found.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Creates a new `Git.Config` struct.

## Options

  * `:binary` - path to the git executable (default: auto-detected)
  * `:working_dir` - working directory for git commands (default: `nil`, uses current directory)
  * `:env` - list of `{key, value}` tuples for environment variables (default: `[]`)
  * `:timeout` - command timeout in milliseconds (default: `30000`)

## Examples

    iex> config = Git.Config.new()
    iex> String.ends_with?(config.binary, "git")
    true

    iex> config = Git.Config.new(working_dir: "/tmp", timeout: 10_000)
    iex> config.working_dir
    "/tmp"
    iex> config.timeout
    10_000

---

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