Files
cheatsheet-tldr/tldr/git-fsck
2025-12-31 00:22:26 +00:00

32 lines
689 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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`