All Tools View Categories About Contact Privacy

Git Config Generator

Tune identity, signing, pull/merge behaviour, and a curated alias block — then get a clean, commented .gitconfig you can keep and share.

Runs entirely in your browser — nothing you type is uploaded.

The generated file is user-level ~/.gitconfig, written as standard INI with comments explaining each option.

Verify what Git actually loads with git config --list --show-origin.

For one-off overrides you can still set values per repo: git config merge.ff false.

GPG — writes gpg.format = gpg and uses your key id or email.

SSH — writes gpg.format = ssh; key defaulting to ~/.ssh/id_ed25519.

X.509 — writes gpg.format = x509 for S/MIME certificates.

With the work include enabled, every repo under ~/work/ also reads ~/.gitconfig-work, where you can keep a second identity, different signing key, or stricter aliases.

0
lines
0
bytes
—
sections
~/.gitconfig

    

About Git Config Generator

Assemble a clean, commented .gitconfig from the settings you actually use: identity and signing, modern pull/merge defaults, a curated alias block, and an optional includeIf split between personal and work repositories. Every option writes a documented line, so the result is easy to read and edit later.

Features

Identity and commit/tag signing (off, GPG, SSH, X.509),Core editor, pager, autocrlf, fsmonitor, and untracked cache toggles,Modern defaults: defaultBranch main, pull.rebase, merge.ff false,A curated alias block with per-alias toggles plus free-form custom aliases,includeIf "gitdir:~/work/" section for separate work config,Live byte/line counts and one-click copy, download, or print

How to Use

1. Fill in your name and email (or leave blank to omit [user]). 2. Pick a signing method and key if you sign commits. 3. Toggle the core, pull/merge, and alias options you want. 4. Add any custom aliases, one per line. 5. Click "Generate .gitconfig" and copy, download, or print the result.

Examples

Start with name and email, main as the default branch, pull.rebase true, merge.ff false, and the standard aliases. For work, enable the includeIf block and keep a separate ~/.gitconfig-work with a different email and signing key.

Benefits

No config-writing guesswork, no syntax errors, and no secrets leaving the browser. The output is documented, versionable, and works across every OS Git runs on.

Frequently Asked Questions

Is the generated .gitconfig uploaded anywhere?
No. The builder runs entirely in your browser with plain JavaScript. Your name, email, keys, and aliases never leave the page, and the assembled .gitconfig is produced locally on demand.
Where should I place the generated file?
Save it as ~/.gitconfig (user-global) or .git/config in a repository (repo-scoped). The generator emits the user-level form, and most sections there also work repo-scoped. Use git config --list --show-origin to see what Git actually loads.
What does includeIf "gitdir:~/work/" do?
It tells Git to additionally load ~/.gitconfig-work for any repository located under ~/work/. The generator adds that include when the option is enabled, so you can keep a separate identity, aliases, or behaviour for work repositories.
Which signing methods are supported?
Off, GPG (gpg.format=gpg), SSH (gpg.format=ssh plus key from ~/.ssh), and X.509 (gpg.format=x509). The generator writes the matching [user] signingkey and commit/tag signing flags so git commit -S just works.
What are the recommended core settings?
init.defaultBranch main, pull.rebase true, merge.ff false, push.default current, and push.autoSetupRemote true are modern defaults. The generator includes them as options and documents each with a comment in the output.
Do the aliases overwrite built-in commands?
No. Aliases only add new commands or shorthand for existing ones (for example unstage = reset HEAD --). They do not replace built-in git verbs, and you can name them anything by editing the alias list before generating.
Can I add my own aliases?
Yes. The common aliases are offered as toggles, and an extra textarea accepts one alias per line in the form name = command, which is appended verbatim to the [alias] section.
Does the output work on macOS, Linux, and Windows?
Yes. The INI syntax is identical everywhere. autocrlf, fsmonitor, and the credential-free pager settings adjust cleanly; on Windows, Git for Git Bash reads the same ~/.gitconfig.