implemented removal of corrupt tracking branches
Oh, git, you made this so hard. Not determining if a branch pointed to some corrupt object, that was easy, but dealing with corrupt branches using git plumbing is a PITA.
This commit is contained in:
parent
6d8250c255
commit
fcd91be6f0
5 changed files with 195 additions and 24 deletions
|
@ -15,9 +15,19 @@ It does by deleting all corrupt objects, and retreiving all missing
|
|||
objects that it can from the remotes of the repository.
|
||||
|
||||
If that is not sufficient to fully recover the repository, it can also
|
||||
reset branches back to commits before the corruption happened. It will only
|
||||
do this if run with the --force option, since that rewrites history
|
||||
and throws out missing data.
|
||||
reset branches back to commits before the corruption happened, and delete
|
||||
branches that are no longer available due to the lost data. It will only
|
||||
do this if run with the `--force` option, since that rewrites history
|
||||
and throws out missing data. Note that the `--force` option never touches
|
||||
tags, even if they are no longer usable due to missing data.
|
||||
|
||||
After running this command, you will probably want to run `git fsck` to
|
||||
verify it fixed the repository. Note that fsck may still complain about
|
||||
objects referenced by the reflog, if they were unable to be recovered.
|
||||
Use `git fsck --no-reflogs` to skip such objects.
|
||||
|
||||
Since this command unpacks all packs in the repository, you may want to
|
||||
run `git gc` afterwards.
|
||||
|
||||
# AUTHOR
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue