Skip to content

Recovering a board its repository lost

A local board lives on a hidden ref inside the repository, and those refs are never pushed. So a repository that is deleted and cloned again comes back without a single board, and looks exactly like one that never had any — nothing else in the app would ever mention them again.

That is what the disaster-recovery mirror is for: every write also lands in a bare git repository of the board's own under ~/.git-manager/boards/, outside the repository entirely. The board view reads it on open and offers back whatever the mirror still holds and the repository no longer does.

A board the repository lost is offered back from the mirror

Opening the board on a repository with no board of its own — because it was deleted and cloned again, or the ref was never fetched in the first place — checks the mirror before giving up. If it still holds any, a recovery banner offers them back by name, with how many cards each has and when it last changed; restoring one writes it straight back into the repository's own history, and the offer is gone once there is nothing left the repository doesn't already have.

A board the repository lost is offered back from the mirror

Captured from the running app by this scenario.

Do this

  1. Open the board
  2. Create a board named Sprint 1 with the card prefix GM
  3. Add a card titled Rework the exporter to the To do column
  4. Create a standing board named Backlog with the card prefix BL
  5. Open the board
  6. Restore the board Sprint 1
  7. Restore the board Backlog

You should see

  • The board Sprint 1 is mirrored outside the repository
  • The board Backlog is mirrored outside the repository
  • The repository stores 0 boards in its own git history
  • The board Sprint 1 is offered for recovery
  • The board Backlog is offered for recovery
  • The recovery offer for Sprint 1 says it holds 1 card
  • The recovery offer for Backlog says it holds 0 cards
  • The board Sprint 1 is shown
  • The card Rework the exporter is shown on the board
  • The board Backlog is offered for recovery
  • The board Backlog is shown
  • The repository stores 2 boards in its own git history
  • The board history records git-manager: restore board from backup
  • No board is offered for recovery any more
  • No error notification is displayed

This page is generated from apps/e2e/features/board-recovery.feature, the end-to-end test that drives the feature it describes.

MIT licensed · Screenshots exported from the real app by the end-to-end suite.