Skip to content

Support for operating in plain git mode (without a multi-branch workspace) #11866

@krlvi

Description

@krlvi

Background

GitButler currently operates on branches that are transparently integrated in an local-only octopus merge commit.

*         <- origin/main
|   m      <- gitbutler/workspace
|  / \
| a2  |    <- feature-a 
| |   b2    <- feature-b
| a1  |
|/    b1
*    /
| __/
*

In the above schematic, m is an app-managed merge commit not displayed in the app, referenced as gitbutler/workspace. Branches feature-a and feature-b are independently merge-able (i.e. not stacked) and thus can be pushed to the remote independently.

This setup facilitates the support of having multiple independent, non-stacked branches checked out at the same time.

A current limitation in GitButler is that this the merge commit m and the gitbutler/workspace branch are setup even when no multitasking is required.

*    <- origin/main
| m   <- gitbutler/workspace
| |
| a   <- feature-a 
| |
| a
|/
*

Objectives

  • Support a "single branch" mode (no workspace branch, no integration merge commit)
  • Switch into a workspace when it is requested from the app to apply a second concurrent branch
  • Switch out of a workspace when removing a branch from the workspace leaves it with just a single branch

Sub-tasks

Foundations

APIs to overhaul

Metadata

Metadata

Assignees

Labels

enhancementAn improvement to an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions