jdx/mise · error

the setup branch ` ` is not at any more (renamed, or…

Error message

the setup branch `{}` is not at {} any more (renamed, or deleted?); nothing was changed. `mise dot origin set {} --branch <name>` follows a renamed branch

What it means

During a non-offline sync, mise fetches the configured origin branch to detect changes. If the branch no longer exists upstream while a previously-recorded upstream commit exists, treating it as empty would queue deletion of every tracked file, so mise aborts without changing anything and suggests re-pointing at the renamed branch.

Solutions

  1. If the branch was renamed, follow it: `mise dot origin set <url> --branch <new-name>`, then re-run sync.
  2. If the branch was deleted but a replacement exists, set the origin branch to the replacement and sync.
  3. If deletion was unintentional, restore the branch upstream (push it back) and re-run sync.
  4. If offline sync is desired, use the offline mode so the vanished branch is not treated as an empty upstream.

Example fix

// before: branch renamed main -> master
mise dot sync // error: the setup branch `main` is not at <url> any more
// after
mise dot origin set git@example.com:me/dotfiles.git --branch master
mise dot sync
Defensive patterns

Strategy: validation

Validate before calling

// confirm the branch exists upstream before syncing
if !remote_has_branch(origin.url, origin.branch) {
    eprintln!("branch missing upstream; update: mise dot origin set <url> --branch <name>");
    return;
}

Try / catch

match sync() {
    Err(e) if e.to_string().contains("any more (renamed, or deleted?)") => eprintln!("re-point: mise dot origin set <url> --branch <name>"),
    other => other,
}

Prevention

When it happens

Trigger: `mise dot sync` with a connected origin whose configured branch was renamed or deleted on the remote, while status.upstream_commit is set (this machine had synced before).

Common situations: Upstream renamed `main` to `master` (or vice versa); the branch was deleted after a repo cleanup; syncing against a fork where the branch never existed; typo introduced when re-setting the origin URL.

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


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/555170ae639dba43. Report an issue: GitHub.

Appendix: source

Thrown at src/system/history/sync/run.rs:270

        .ok_or_else(|| eyre::eyre!("synchronizing requires git"))?;
    let mode = SyncMode::current()?;
    let allow_plaintext_history = request.allow_plaintext_history
        || crate::config::Settings::get()
            .history
            .allow_plaintext_history;
    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 dot origin set {} --branch <name>` follows a renamed branch",
                    origin.branch,
                    origin.url,
                    origin.url
                );
            }
            // a machine that has never synced has no vanished-branch signal,
            // so a branch this repository does not have (a declaration that
            // named the wrong one, or omitted it and took the default) must
            // not read as an empty upstream either
            if !found {
                super::origin::refuse_missing_branch(&remote, &origin.branch, &origin.url)?;
            }
            if !found && repo.ref_oid(UPSTREAM_REF)?.is_some() {
                repo.delete_ref(UPSTREAM_REF)?;
            }
            status.last_fetch = Some(hstore::now_rfc3339());
        }

View on GitHub (pinned to 533346cc37)