Skip to content

Restoring After Git Clean

If you run git clean -fd or otherwise lose your overlay files, repoverlay can restore them from its external backup.

Terminal window
repoverlay restore

This re-applies all previously applied overlays using the information stored in ~/.local/share/repoverlay/applied/.

Terminal window
repoverlay restore --dry-run

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
  • After running git clean -fd or git clean -fdx
  • After checking out a branch that removes the .repoverlay/ directory
  • After any operation that deletes untracked files from the repository