Configure a backup remote
Add a[backup] section to .kiwi/config.toml inside your knowledge root.
rebase_before_push defaults to true. You only need to set it when you want the config file to show the behavior explicitly.Run a one-shot backup
Usekiwifs backup to push immediately.
What happens before push
Whenrebase_before_push is enabled, KiwiFS does this for each backup push:
- Ensures the local git remote named
backuppoints to your configuredremote. - Resolves the backup branch from
[backup].branch, the current git branch, thenmain. - Checks whether the remote branch exists.
- Fetches
backup/<branch>when the remote branch exists. - Refuses automatic rebase if the worktree has uncommitted changes.
- Rebases clean local commits onto
backup/<branch>. - Pushes the branch to the backup remote.
- Verifies that the remote branch HEAD matches the local HEAD.
Safety behavior
KiwiFS automates only the routine, safe path.- It does not force-push.
- It only rebases a clean git worktree.
- It does not resolve conflicts for you.
- If rebase fails, KiwiFS aborts the rebase and records the backup error.
- Before rebasing, KiwiFS stores the previous local HEAD at
refs/kiwifs/backup-pre-rebase.
Disable rebase-before-push
Disable this only when another process owns git synchronization and you want KiwiFS to perform a plain push.- Config
- Environment
- CLI
Troubleshooting
Dirty worktree
If KiwiFS reportsworktree has uncommitted changes; refusing automatic rebase, inspect the repository and save or discard the local changes.