Git Advanced Cheat Sheet/Check repository integrity

Verify object connectivity and repository health.

Section: Recovery and Debugging

Check repository integrity

bash
bash
git fsck --full
Explanation

Useful when investigating possible repository corruption or dangling objects after recovery operations.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Recovery and Debugging
Show reflog with local timestamps
Inspect branch and HEAD movements with readable times.
OpenIn sheetbashsame section
Inspect ORIG_HEAD
View the previous HEAD after disruptive operations.
OpenIn sheetbashsame section
Start a bisect session
Begin a binary search to find the commit that introduced a bug.
OpenIn sheetbashsame section
Interactive rebase last 5 commits
Open the last 5 commits in the interactive rebase todo list.
OpenIn sheetbash1 tag match
Create an additional worktree for a branch
Check out another branch in a separate directory without cloning again.
OpenIn sheetbash1 tag match
Cherry-pick a range without committing
Apply commit changes into the index and working tree first.
OpenIn sheetbash1 tag match