Home Explore Blog CI



git

2nd chunk of `Documentation/git-fsck.adoc`
549774130755a66dace643a4827e28760c83e8253cbdf27600000001000007e7
 does still check that referenced blobs
	exist). This will detect corruption in commits and trees, but
	not do any semantic checks (e.g., for format errors). Corruption
	in blob objects will not be detected at all.
+
Unreachable tags, commits, and trees will also be accessed to find the
tips of dangling segments of history. Use `--no-dangling` if you don't
care about this output and want to speed it up further.

--strict::
	Enable more strict checking, namely to catch a file mode
	recorded with g+w bit set, which was created by older
	versions of Git.  Existing repositories, including the
	Linux kernel, Git itself, and sparse repository have old
	objects that trigger this check, but it is recommended
	to check new projects with this flag.

--verbose::
	Be chatty.

--lost-found::
	Write dangling objects into .git/lost-found/commit/ or
	.git/lost-found/other/, depending on type.  If the object is
	a blob, the contents are written into the file, rather than
	its object name.

--name-objects::
	When displaying names of reachable objects, in addition to the
	SHA-1 also display a name that describes *how* they are reachable,
	compatible with linkgit:git-rev-parse[1], e.g.
	`HEAD@{1234567890}~25^2:src/`.

--[no-]progress::
	Progress status is reported on the standard error stream by
	default when it is attached to a terminal, unless
	--no-progress or --verbose is specified. --progress forces
	progress status even if the standard error stream is not
	directed to a terminal.

--[no-]references::
	Control whether to check the references database consistency
	via 'git refs verify'. See linkgit:git-refs[1] for details.
	The default is to check the references database.

CONFIGURATION
-------------

include::includes/cmd-config-section-all.adoc[]

include::config/fsck.adoc[]

DISCUSSION
----------

git-fsck tests SHA-1 and general object sanity, and it does full tracking
of the resulting reachability and everything else. It prints out any
corruption it finds (missing or bad objects), and if you use the

Title: Git FSCK Command Options and Configuration
Summary
The git-fsck command provides various options to customize its behavior, including strict checking, verbose output, and progress reporting, and also allows configuration via git config, to detect and report corruption and inconsistencies in the Git database.