jdx/mise · error
the setup branch `{}` is not at {} any more (renamed, or del
Error message
the setup branch `{}` is not at {} any more (renamed, or deleted?); nothing was changed. `mise bootstrap dotfiles origin set {} --branch <name>` follows a renamed branch What it means
During sync, mise fetches the configured upstream branch. If the fetch reports the branch no longer exists remotely and a previous upstream commit is recorded, treating it as an empty upstream would queue deletion of every file it contained — so mise aborts without changing anything. This protects against branch renames/deletions wiping your dotfiles.
Source
Thrown at src/system/history/sync/run.rs:256
None => origin()?,
};
let repo = store
.repo()
.ok_or_else(|| eyre::eyre!("synchronizing requires git"))?;
let mode = SyncMode::current()?;
let state_dir = store.state_dir();
let mut status = read_status(state_dir)?;
let remote = Remote::new(repo, &origin.url);
let mut outcome = SyncOutcome::default();
let result = (|| -> Result<()> {
if !request.offline {
// a branch that vanished from a repository this machine had
// synced with is not an empty upstream: reading it as one would
// queue the deletion of every file it held
let found = remote.fetch(&origin.branch)?;
if !found && status.upstream_commit.is_some() {
bail!(
"the setup branch `{}` is not at {} any more (renamed, or deleted?); nothing was changed. `mise bootstrap dotfiles origin set {} --branch <name>` follows a renamed branch",
origin.branch,
origin.url,
origin.url
);
}
if !found && repo.ref_oid(UPSTREAM_REF)?.is_some() {
repo.delete_ref(UPSTREAM_REF)?;
}
status.last_fetch = Some(hstore::now_rfc3339());
}
let mut upstream_commit = repo.ref_oid(UPSTREAM_REF)?;
outcome.fetched_upstream = upstream_commit.clone();
let repo_state = format::detect(repo, upstream_commit.as_deref())?;
repo_state.check()?;
if repo_state == RepoState::Unmarked && !status.adopted {
bail!(
"{} is an existing repository without the mise marker; `mise bootstrap dotfiles origin set {}` previews how it would be adopted",View on GitHub (pinned to afd2eddd3a)
Solutions
- If renamed, follow it: `mise bootstrap dotfiles origin set <url> --branch <new-name>` then sync again
- If deleted unintentionally, restore the branch on the remote, then re-run sync
- If the repository itself moved, set the new URL: `mise bootstrap dotfiles origin set <new-url>`
Example fix
// before $ mise bootstrap dotfiles sync error: the setup branch `main` is not at git@github.com:me/dotfiles.git any more // after $ mise bootstrap dotfiles origin set git@github.com:me/dotfiles.git --branch master $ mise bootstrap dotfiles sync
Defensive patterns
Strategy: validation
Validate before calling
git ls-remote <url> <branch> # confirm the branch still exists before syncing
Prevention
- Keep the setup branch name stable across machines, or update `origin set --branch` whenever it is renamed
- Never delete/rename the setup branch without notifying all synced machines
When it happens
Trigger: `mise bootstrap dotfiles sync` (non-offline) where `remote.fetch(&origin.branch)` returns `found == false` while `status.upstream_commit` is `Some`; i.e. the branch that was previously synced has disappeared from the remote.
Common situations: The remote repository renamed its branch (e.g. `main` -> `master` or a personal rename); the branch was deleted after a repo reorganization; the remote repo was replaced/recreated without that branch.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- incoming setup has not been completely applied; run `mise bo
- no setup repository is connected; `mise bootstrap dotfiles o
- {} is an existing repository without the mise marker; `mise
- comparing checkpoints requires git
- listing snapshot files requires git
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/f5b0905aad6a43f1.
Report an issue: GitHub.