Skip to content

CLI apply reports success but leaves outdated branch unapplied #14043

Description

@sciyoshi

Version

but 0.5.2053

Operating System

macOS 26.5, Apple Silicon

Distribution Method

Nightly / CLI

Describe the issue

When applying an older local branch with but apply, the CLI can report success even though the branch remains unapplied and is not added to the workspace commit.

The command exits with status 0 and prints a success message:

Applied branch 'feature/outdated-branch' to workspace

However, checking afterward shows that the branch is still listed under unapplied branches and is absent from the applied workspace state.

How to reproduce

I do not have a minimal public repository yet, but this reproduced in a repository with several applied virtual branches and one older, non-updated local branch.

  1. Start with a GitButler workspace that has multiple applied branches.
  2. Have an older local branch, e.g. feature/outdated-branch, that is listed under Unapplied Branches by but branch list.
  3. Run:
but apply feature/outdated-branch
  1. Observe the command output:
Applied branch 'feature/outdated-branch' to workspace
  1. Run:
but branch list
but status -fv
git log --oneline --decorate --graph --max-count=12 gitbutler/workspace

Actual behavior

but apply exits successfully and prints that the branch was applied, but:

  • but branch list still shows feature/outdated-branch under Unapplied Branches
  • but status -fv does not show the branch in the workspace
  • gitbutler/workspace does not include the branch

Expected behavior

Either:

  • the branch is actually applied to the workspace, or
  • the command exits non-zero and reports why it could not apply the branch, such as conflicts, branch needing update, or another workspace state issue

Notes

This may be related to existing apply/conflict handling issues, but the confusing part here is specifically the CLI success message and zero exit status when the branch remains unapplied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIThe command-line program `but`bugSomething isn't working🎉reproduced🎉The issue could be reproduced by following the instructions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions