Skip to content
Novus Examples
gitconfig601 B

Gitconfig - Sections, Quoted Subsections and Shell Aliases

A realistic global config exercising the whole INI-like grammar: bracketed sections, quoted subsection names that are case-sensitive while section names are not, values with size suffixes, a shell alias whose leading `!` changes how the rest is executed, and both comment characters.

Preview — first 29 linesgitconfig
[user]
	name = Ada Fernsby
	email = ada.fernsby@example.invalid
[core]
	editor = nvim
	autocrlf = input
	pager = delta
	bigFileThreshold = 64m
[init]
	defaultBranch = main
[merge]
	conflictStyle = zdiff3
[diff]
	algorithm = histogram
	colorMoved = zebra
[url "ssh://git@git.example.invalid/"]
	insteadOf = https://git.example.invalid/
[color "status"]
	changed = yellow bold
	untracked = cyan
[alias]
	lg = log --graph --oneline --decorate
	fixup = !git commit --fixup $(git rev-parse HEAD) # shell alias, note the leading !
[rerere]
	enabled = true
; a semicolon also starts a comment
[gc]
	auto = 0

Specifications

Seed
20260807
Repository Name
~/.gitconfig
Sections
11
Subsections
2
Comment Chars
# and ;
Size Suffixes
64m
Shell Alias
true
Line Endings
LF
Encoding
UTF-8

Testing contract

Expected to pass
Scenario
Read the value of url."ssh://git@git.example.invalid/".insteadOf and of core.bigFileThreshold.
Expected result
The subsection name is preserved verbatim including its case and slashes, and bigFileThreshold resolves to 67108864 bytes (64m is binary, not decimal).

What is a .gitconfig file?

A .gitconfig file holds Git configuration in an INI-like syntax: bracketed section headers, optional subsection names in quotes, and `key = value` pairs. The same grammar serves the system, global, and per-repository files, which are layered in that order, and values may be booleans, integers with `k`/`m`/`g` suffixes, colours, or paths. Comments begin with `#` or `;`.

How to use this file

Use an example .gitconfig file to test INI-style configuration parsers and Git tooling, checking quoted subsection names, value continuation, boolean coercion, and precedence when the same key appears more than once.

How to use this file for testing

“Gitconfig - Sections, Quoted Subsections and Shell Aliases” is a deterministic Novus Examples fixture for Config parsing, Config testing, Visual diff / regression. TOML and INI configuration files with nested sections and typed values — for testing config parsers and loaders.

Documented properties for this file: seed 20260807 · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Diff and patch fixtures name their target paths and the exact edge case they exercise — rename, mode change, binary hunk, CRLF↔LF, or missing trailing newline. Apply or render them against the documented before-state; every author, path, and hash is fictional.

Point your config loader at the file and assert it reads the documented sections and typed values, including any deliberately-tricky nesting or comments.

Generated by generation/version_control.py. Free for any use, no attribution required — license.