git-repair

repairs a damaged git repository

http://git-repair.branchable.com/

Latest on Hackage:1.20230814

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

AGPL-3.0-only licensed by Joey Hess
Maintained by Joey Hess

git-repair can repair various forms of damage to git repositories.

It is a complement to git fsck, which finds problems, but does not fix them.

As well as avoiding the need to rm -rf a damaged repository and re-clone, using git-repair can help rescue commits you've made to the damaged repository and not yet pushed out.