This guide will show you how to manage your Git configuration in Coder.
Coder will create a global git configuration file located at
all newly created environments and set the user name and email address using the
information associated with the user's Coder account.
This step occurs before coder/configure
and personalization, which can be used
to override the default
.gitconfig created by Coder. If there's already a
.gitconfig file, Coder will not recreate a default version when you rebuild an
We recommend that each Coder user set and modify their personal .gitconfig file using the ~/personalize script.
Preferences defined using individual
.gitconfig files take precedence over
If you have a set of git configuration instructions that apply to your
organization as a whole, you can define and use a system-level git
configuration. We suggest adding the system-level
.gitconfig directly to the
# Add system-level gitconfig COPY ["gitconfig", "/etc/gitconfig"]
As you can see from the example, system-level git configurations live under
/etc/gitconfig. If present,
git applies the settings to each repository.
However, any Coder user can override system-level settings using global or
worktree git configurations.
For more information on git configuration, refer to the official documentation