Skip to content
Novus Examples
gitmodules407 B

Gitmodules - Three Submodules With Relative URL and branch = .

Three submodules covering the awkward values: a relative `../currency-tables.git` URL that has to be resolved against the superproject's remote, `branch = .` meaning 'the same branch as the superproject', and `ignore = dirty` which hides a submodule's local changes from `git status`. The section name and the `path` value are separate strings and are allowed to differ.

Preview — first 15 linesgitmodules
[submodule "vendor/ledger-schema"]
	path = vendor/ledger-schema
	url = https://git.example.invalid/sample-org/ledger-schema.git
	branch = main
[submodule "vendor/currency-tables"]
	path = vendor/currency-tables
	url = ../currency-tables.git
	shallow = true
	update = rebase
[submodule "docs/theme"]
	path = docs/theme
	url = https://git.example.invalid/sample-org/docs-theme.git
	ignore = dirty
	branch = .

Specifications

Seed
20260807
Repository Name
.gitmodules
Submodules
3
Relative Urls
1
Shallow
1
Branch Dot Means Current
true
Line Endings
LF
Encoding
UTF-8

Testing contract

Expected to pass
Scenario
Resolve the clone URL and tracked branch of every submodule from a .gitmodules file.
Expected result
vendor/currency-tables resolves ../currency-tables.git against the superproject remote, and docs/theme's 'branch = .' resolves to the superproject's current branch rather than a branch literally named '.'.

What is a .gitmodules file?

A .gitmodules file records the submodules of a Git repository. It uses the same INI-like grammar as .gitconfig, with one `[submodule "name"]` section per entry holding the working-tree `path`, the `url` to clone from, and optionally `branch`, `update`, `shallow`, and `ignore` settings. It is tracked in the repository, unlike the resolved submodule state, which lives in the index as gitlink entries.

How to use this file

Use an example .gitmodules file to test submodule-aware tooling, dependency scanners, and configuration parsers, verifying that section names and working-tree paths are read independently and that relative URLs are resolved against the parent remote.

How to use this file for testing

“Gitmodules - Three Submodules With Relative URL and branch = .” 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.