Skip to content

Support remote refs for Git base branch #83

Description

@OverHash

Currently, dmux only loads refs/heads to let you choose the base branch to create the new pane from.

This is more limited than other places in dmux, as you cannot use remote refs. Adding support for refs/remotes loading would allow one to base a branch from a remote ref as well.

Then, you could create branches from things like origin/main, origin/release/2026.04, upstream/feature/foo.

I achieved this in https://github.com/OverHash/dmux/tree/afb8c8084de0b40fcd6ad7f5fa9a3d8d04f15df6 by:

  1. If both main and origin/main exist (i.e., both a local and remote ref exist), just show main. But also accept fully-qualified origin/main.
  2. If only a remote ref exists, show it (origin/release/2026.04)

I also ignored symbolic refs like origin and origin/HEAD from appearing in the picker (git for-each-ref refs/remotes shows them).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions