The behavior of git-spice can be customized with git config.
Configuration options may be set at the user level with the --global flag,
or at the repository level with the --local flag.
What about --system and --worktree?
All configuration levels supported by git config are allowed,
although --system and --worktree are less commonly used.
Use --worktree to override repository-level settings
for a specific git-worktree.
When running gs branch checkout without any arguments,
git-spice presents a prompt to select a branch to checkout.
This option controls whether untracked branches are shown in the prompt.
Commands like gs branch checkout, gs branch onto, etc.,
that require a branch name will present an interactive prompt
to select the branch when one isn't provided.
This option controls the sort order of branches in the prompt.
It is git-spice's equivalent of
git's branch.sort configuration.
Whether gs branch create should commit staged changes to the new branch.
Set this to false to default to creating new branches without committing,
and use the --commit flag to commit changes when needed.
Whether gs log short and gs log long should show
whether the branch is in sync with its pushed counterpart.
Accepted values:
true (default): show the push status
false: don't show the push status
"aheadBehind":
show the number of outgoing and incoming commits in the form ⇡1⇣2,
where ⇡ indicates outgoing commits and ⇣ indicates incoming commits
Default value for the --draft/--no-draft flag when creating new change
requests with gs branch submit and friends.
$ git config spice.submit.drafttrue$ gs branch submit# ...Draft: [Y/n]Mark the change as a draft?$ git config spice.submit.draftfalse$ gs branch submit# ...Draft: [y/N]Mark the change as a draft?
This option affects both interactive and non-interactive modes:
In non-interactive mode, setting this value to true
will cause git-spice to assume --draft when creating new change requests.
In interactive mode, this value is used as the default for the prompt
asking whether to create the change request as a draft.
Accepted values:
true: create CRs as drafts by default
false (default): create CRs as ready for review by default
Maximum duration that gs branch submit will wait
to receive a list of available CR templates from the forge.
If the timeout is reached, the command will proceed without a template.
Value must be a duration string such as 5s, 1m, 1h, etc.
Defaults to 1s.
Bump this value if you see warnings like any of the following:
WRN Failed to cache templates err="cache templates: write object: hash-object: signal: killed"
WRN Could not list change templates error="list templates: Post \"https://api.github.com/graphql\": context deadline exceeded"
Whether submission commands ( gs branch submit and friends)
should publish a CR to the forge.
If this is set to false, submit commands will push branches,
but not create CRs.
In that case, the --publish flag will opt-in to creating CRs
on a case-by-case basis.