HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git fsck — Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any mod

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandconnectivityandcligit fsckvalidityverify

Problem

How to use the git fsck command: Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any modifications. See also: git gc. More information: <https://git-scm.com/docs/git-fsck>.

Solution

git fsck — Verify the validity and connectivity of nodes in a Git repository index. Note: Does not make any modifications. See also: git gc. More information: <https://git-scm.com/docs/git-fsck>.

Check the current repository:
git fsck


List all tags found:
git fsck --tags


List all root nodes found:
git fsck --root


Show all unreachable and dangling objects, ignore reflogs, and perform a full integrity check:
git fsck --dangling --no-reflogs --unreachable --full


Check connectivity only (skip object integrity verification):
git fsck --connectivity-only

Code Snippets

Check the current repository

git fsck

List all tags found

git fsck --tags

List all root nodes found

git fsck --root

Show all unreachable and dangling objects, ignore reflogs, and perform a full integrity check

git fsck --dangling --no-reflogs --unreachable --full

Check connectivity only (skip object integrity verification)

git fsck --connectivity-only

Context

tldr-pages: common/git fsck

Revisions (0)

No revisions yet.