Git config for macOS, Linux and Windows: SSH commit and tag signing, per-platform credential helpers, GitHub CLI auth and global hook wiring.
Identity, SSH commit signing, credential helpers and hook wiring are set once here rather than reconfigured from memory on every fresh machine.
- Identity -
user.nameanduser.email, set to placeholders you replace with your own. - Commit and tag signing - SSH-format signing (
gpg.format = ssh) using a dedicated signing key, separate from the key used for authentication.allowedSignersFilepoints at the list of keys Git trusts for verifying signatures locally. - Hook wiring -
core.hooksPathpoints at a global hooks directory such as the one installed from git-hooks, so every repo runs the same hooks without per-repo setup. - Credential helper - the platform's native credential store, plus a
gh auth git-credentialoverride forgithub.comandgist.github.comso HTTPS operations authenticate through the GitHub CLI's token instead of a separate stored password. - Git LFS filters - the standard
clean,smudgeandprocesswiring.
See guides/reference.md for what every section does and why.
Everything is identical across macOS, Linux and Windows except the credential helper:
osxkeychain on macOS, libsecret on Linux (needs libsecret or gnome-keyring installed) and
manager on Windows (bundled with Git for Windows). That is why mac/, linux/ and windows/
each carry their own copy rather than one file with a conditional.
Important
Replace user.name, user.email and user.signingkey with your own values before installing.
The files ship with placeholders, see guides/setup.md.
git clone https://github.com/zaccesss/git-config.git ~/.git-config-src
cp ~/.git-config-src/<platform>/gitconfig ~/.gitconfigReplace <platform> with mac, linux or windows.
| Path | Contents |
|---|---|
mac/ |
The full config with the macOS credential helper |
linux/ |
The full config with the Linux credential helper |
windows/ |
The full config with the Windows credential helper |
guides/ |
Install walkthrough and the section-by-section reference |