Skip to content

repository

Tracked files: large files outside Git LFS, merge-conflict markers, and paths that a configuration keeps out of Git.

Always.

Checks that each tracked file over the size limit goes through Git LFS or has a reason.

Runs at the commit stage.

A large file in plain Git history stays in every clone forever.

Track the file with Git LFS, classify it as generated or vendored in .gitattributes, or raise repository.max_file_kilobytes with a reason.

A tracked notes/big.txt over repository.max_file_kilobytes reports size. Delete the file, or store it through Git LFS.

gspot ignore repository/large-files --paths "<path>" --reason "<why>"

Reports a tracked file at a path that a configuration keeps out of Git, and each tracked symbolic link that leaves the repository.

Runs at the commit stage, once for the repository.

Machine-local values and installed packages belong outside shared Git history.

Add the reported file or folder to .gitignore and remove it from the index with git rm --cached.

A tracked .env reports tracked-file. Add the path to .gitignore, then run git rm --cached .env, which keeps the file on disk.

Rule What it checks What to do
tracked-file Git tracks no file that a selected configuration declares local, such as .env. Run git rm --cached <path>, and list the path in .gitignore.
absolute-link Each symbolic link has a relative target. Use a relative link target inside the repository.
outward-link Each symbolic link points inside the repository. Replace the link with the file or folder it points to, or delete it.
gspot ignore repository/local-files --paths "<path>" --reason "<why>"
gspot ignore repository/local-files --rule tracked-file --reason "<why>"

Reports each line of a tracked text file that a Git merge conflict leaves behind.

Runs at the commit stage.

A file with conflict markers holds both sides of a merge, and a fixer can turn the markers into content that passes.

Keep the side of the conflict that you want, and delete the marker lines.

A line <<<<<<< HEAD left in a file reports conflict-marker. Resolve the conflict, and delete the markers.

gspot ignore repository/conflict-markers --paths "<path>" --reason "<why>"

Checks that tracked text files use UTF-8.

Runs at the commit stage.

A text check reads the wrong characters in a file that is not UTF-8.

Save the reported file as UTF-8.

A tracked Latin-1 notes.md reports encoding. Save the file as UTF-8.

Rule What it checks What to do
encoding Each tracked text file is UTF-8. Convert the file to UTF-8 in an editor or with iconv.
path-encoding Each tracked path is UTF-8. Give the file a name that is valid UTF-8, such as a name in plain ASCII.
gspot ignore repository/encoding --paths "<path>" --reason "<why>"
gspot ignore repository/encoding --rule encoding --reason "<why>"
Setting What it sets
repository.max_file_kilobytes The largest file, in kilobytes, that Git may track without Git LFS or a linguist-generated or linguist-vendored mark in .gitattributes.

**/coverage/**. repository/local-files reports a tracked file at these paths.