index file recovery
This commit is contained in:
parent
5673fbbd72
commit
3e61749d08
6 changed files with 69 additions and 16 deletions
|
@ -148,8 +148,5 @@ that was found for it.
|
|||
if none was found. **done**
|
||||
* (Decided not to touch tags.)
|
||||
|
||||
TODO: The index file can still refer to objects that were missing.
|
||||
This prevents git commit from working. And simply re-staging things doesn't
|
||||
seem to help; git sees the sha is "known" and does not re-add it,
|
||||
apparently. So, need to do something to clean up the index, while ideally
|
||||
not losing any staged changes.
|
||||
The index file can still refer to objects that were missing.
|
||||
Rewrite to remove them. **done**
|
||||
|
|
|
@ -15,11 +15,12 @@ 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, 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.
|
||||
reset branches back to commits before the corruption happened, delete
|
||||
branches that are no longer available due to the lost data, and remove any
|
||||
missing files from the index. 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue