IT for operating businesses
Using 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>.
- 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
This content is compiled from the open-source tldr-pages project under the MIT license.