Omniscio

Git history missing (the store-loss alert)

When a project's git history (its .git folder) disappears or is replaced, the app notices within a minute, raises one inbox alert, and stops its own git writes — the auto-lander, the worktree reaper and new worktrees — so nothing is written into a broken or empty history. Starting a session from the alert begins the recovery, and everything resumes on its own once the history is whole again.

On this page

What it is

Every project the app manages keeps its whole git history in one hidden folder, .git. That folder holds the only copy of every branch that has not been pushed anywhere, so if it is deleted, emptied or replaced by a fresh empty history, work that exists nowhere else is at risk.

The app watches for that. When a project's history goes missing, it raises one alert in your inbox within about a minute, and it stops its own git work on that project so nothing gets written into a broken or empty history while it is being put back.

Where to find it

The alert appears in the Inbox, titled "A project's git history is missing — the app stopped its own git writes". There is nothing to switch on: the watch runs in the background for every managed project.

How it behaves

  • What counts as missing. The history folder is gone, emptied, or replaced by a new history that does not match the one the app knew (its main branch gone, its stored history gone, or the worktrees still pointing at it no longer known to it). Removing the online copy's address is not a loss. A project the app has never seen healthy is not treated as missing, so a brand-new or placeholder folder never raises the alert — and neither does a project whose whole folder was deleted, moved or is on a drive that is unplugged, because nothing is left there to protect.
  • A computer that is out of memory is not a lost history. When the computer runs short of memory or of open files, reading the history can fail even though nothing is wrong with it. The app treats such a check as "cannot read right now": it raises no alert, pauses nothing, and judges the history again on the next check. A history that was already missing stays missing until a real read proves it is back.
  • One alert, not a flood. The alert is raised after two failed checks in a row, about thirty seconds apart, so a single slow disk read cannot raise it. It is not silenced by the usual alert switches or an inbox rule, or held back to be batched, because it protects your data. It stays one card while the history is missing: dismiss it, or start a session from it, and it comes back until the history is whole again.
  • What stops. The auto-lander lands nothing, the worktree reaper and retire jobs wait, and new worktrees are refused with a clear "history missing" answer instead of being created. A session that would work in its own worktree is not started, or resumed, in your project folder instead; it waits too, except the recovery session started from the alert.
  • How to fix it. Start a session from the alert's button. That session runs the repository's restore command when it has one, and otherwise tells you plainly that the restore tool is not installed yet — it never tries to rebuild the history by hand. While a restore is in progress, the app keeps everything paused, and the same alert says a restore is running instead of offering a second one; if the restore ends with the history still missing, the alert switches back.
  • What it is restored FROM. In the background, every ten minutes, the app keeps a copy of each project's history on a different drive — its branches, its worktree links, and every object that exists only on this computer. The copy is filed under the project's full folder path, so a project that was MOVED (another drive, a rebuilt Windows profile, a new folder name) is filed under the old path. The restore searches every mounted drive and names any copy it finds filed under another path; point it at one with npm run git:restore -- --live --backstop <folder>, or set AMC_GIT_STORE_BACKSTOP_DIR to that folder. The copy never follows a deletion in the live history: a destroyed history can never overwrite the copy of itself, which is why a recovered project can also get back a branch that had been retired before the loss. The copy does tidy ITSELF, though, and only ever by dropping a pack whose every object it already holds elsewhere — never an object. Until 2026-11-13 it could not do even that: its own sweep walked the copy's packs newest-first, and a live history's newest pack is the small one the older packs already cover, so it proved nothing redundant on 986 of 986 passes while that one copy grew to 19 GB and took its drive to 0 bytes free. It now counts, for every object, how many of the copy's packs hold it, and drops a pack whenever each of its objects keeps another holder — so a big pack that several smaller packs cover between them goes too. A .keep lock that git itself writes during a download (fetch-pack <number> on <computer>) no longer pins a pack in the copy, since nothing ever downloads into the copy; a .keep written for any other reason still does. An index whose pack never arrived is removed. Restoring puts the history back as a real folder where the app expects it — never a shortcut to somewhere else — and finishes by fetching the file contents the sessions need, so they can save their work again straight away instead of one failing save at a time.
  • Resuming. Once the history reads healthy on three checks in a row, and no restore is still running, everything resumes by itself. There is nothing to turn back on. A replacement history never counts as healthy on its own: the app waits until the history it knew is back, or a restore has run.

Last verified 2026-10-29