Restoring After Git Clean
If you run git clean -fd or otherwise lose your overlay files, repoverlay can restore them from its external backup.
Restoring overlays
Section titled “Restoring overlays”repoverlay restoreThis re-applies all previously applied overlays using the information stored in ~/.local/share/repoverlay/applied/.
Preview before restoring
Section titled “Preview before restoring”repoverlay restore --dry-runHow backups work
Section titled “How backups work”Every time an overlay is applied, repoverlay saves a copy of the overlay state to an external backup location outside the git repository.
The external backup stores:
- The overlay name and source
- The list of files and their link types
- Enough information to re-apply the overlay from the original source
For more detail on how state tracking and external backups work, see How It Works.
When to use restore
Section titled “When to use restore”- After running
git clean -fdorgit clean -fdx - After checking out a branch that removes the
.repoverlay/directory - After any operation that deletes untracked files from the repository