{"record":{"id":"3142d286a0ff2018","repo":"gitbutlerapp/gitbutler","slug":"attempted-to-update-the-symbolic-reference-name","errorCode":null,"errorMessage":"Attempted to update the symbolic reference {name}","messagePattern":"Attempted to update the symbolic reference (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-rebase/src/graph_rebase/rebase.rs","lineNumber":143,"sourceCode":"                        let reference = self.repo.try_find_reference(&refname)?;\n\n                        if let Some(reference) = reference {\n                            let target = reference.target();\n                            match target {\n                                gix::refs::TargetRef::Object(id) => {\n                                    if id == to_reference {\n                                        unchanged_references.push(refname.clone());\n                                    } else {\n                                        ref_edits.push(RefEdit::update(\n                                            refname.clone(),\n                                            to_reference,\n                                            PreviousValue::MustExistAndMatch(target.into()),\n                                            \"\",\n                                        ));\n                                    }\n                                }\n                                gix::refs::TargetRef::Symbolic(name) => {\n                                    bail!(\"Attempted to update the symbolic reference {name}\");\n                                }\n                            }\n                        } else {\n                            ref_edits.push(RefEdit::update(\n                                refname.clone(),\n                                to_reference,\n                                PreviousValue::MustNotExist,\n                                \"\",\n                            ));\n                        }\n                    }\n\n                    output_graph.add_node(Step::Reference { refname, mutable })\n                }\n                Step::None => output_graph.add_node(Step::None),\n            };\n\n            graph_mapping.insert(step_idx, new_idx);","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-rebase/src/graph_rebase/rebase.rs#L125-L161","documentation":"When the rebase finalizes reference updates, it inspects each existing reference's target. Peel/symbolic references (e.g. a branch pointing at another ref like HEAD or a symref) cannot be rewritten to a concrete commit id, so the library bails instead of clobbering the symref. Only direct (object-id) targets are updated.","triggerScenarios":"Rebasing with a Reference step that resolves to a symbolic reference (TargetRef::Symbolic), such as a virtual branch stored as a symref pointing to another ref, when the rebase tries to update it.","commonSituations":"Workspaces where a branch was converted into a symref (e.g. checked out HEAD attached to the branch); tooling that rewrote refs as symbolic; mixing git CLI operations with GitButler virtual branches.","solutions":["Convert the symbolic reference to a direct reference (git update-ref with the commit oid) before rebasing.","Detach HEAD or un-attach the branch so the reference is a plain object-id ref.","Inspect `git for-each-ref` to find which ref is symbolic and normalize it."],"exampleFix":"// before: refs/heads/feature -> symbolic ref refs/heads/other\n// after\ngit update-ref refs/heads/feature <commit-oid>","handlingStrategy":"validation","validationCode":"// Check the ref is direct before rebasing\ngit for-each-ref --format='%(refname) %(objecttype)' refs/heads/ | grep -v ' commit$'","typeGuard":null,"tryCatchPattern":"match rebase_result {\n    Err(e) if e.to_string().contains(\"Attempted to update the symbolic reference\") => {\n        // extract ref name, run `git update-ref <ref> <oid>`, retry\n    }\n    other => other?,\n}","preventionTips":["Normalize symbolic refs to direct refs before automated rebases","Avoid mixing HEAD-attached symrefs with virtual branch storage","Audit refs with for-each-ref in workspace health checks"],"tags":["rebase","git-refs","symbolic-ref"],"backgroundTag":"unsupported-operation","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}