Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Feature request: support merge-based stack synchronization without force-pushing

Abierto
#445 0 comentarios 12 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
git, github, go
Área
cli, devtools

Línea de trabajo

Empieza rastreando el flujo de trabajo existente "Rebase stack" y el comando de sincronización del stack en la CLI. Determina cómo se gestionan las actualizaciones de ramas, los Force-Pushes, los conflictos, las aprobaciones, los checks y las ramas protegidas. Se considera completado cuando un modo seleccionable basado en Merge sincroniza las ramas en el orden del stack sin realizar Force-Pushes, mientras los stacks existentes basados en Rebase siguen funcionando.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

feature request topic: rebase alternative

Summary

Please add an option for stacked pull requests to synchronize branches using merge commits instead of rebasing and force-pushing branch history.

Motivation

Our organization does not allow force-pushes because they rewrite branch history and can make audit trails, approvals, and incident investigation more difficult. The current "Rebase stack" workflow is therefore incompatible with our repository policies.

Proposed behavior

Add a merge-based synchronization mode for stacks:

  • When a parent branch changes, merge the parent into each child branch in stack order.
  • Preserve existing commits and branch history.
  • Do not force-push rewritten branch history.
  • Keep the existing rebase behavior as the default or as a selectable repository/stack setting.
  • Make the selected synchronization mode visible in the stack UI and CLI.
  • Respect branch protection and merge-commit policies.

Example

Given:

main
└── feature-a
    └── feature-b

When main advances, merge main into feature-a, then merge the updated feature-a into feature-b, instead of rebasing both branches and force-pushing them.

Acceptance criteria

  • A stack can be configured to use merge-based synchronization.
  • Synchronizing the stack does not require force-pushing any branch.
  • Existing approvals and checks are handled consistently with the merge-based history.
  • Conflicts are reported per branch and can be resolved through the normal workflow.
  • The behavior works with protected branches that block force-pushes.
  • Existing rebase-based stacks continue to work unchanged.

Related issues

  • #268: Stacked PR cannot be merged into a merge-queue branch
  • #442: gh stack sync pushed a stack branch's merge commit directly onto the trunk branch
Lenguaje dominante
Go
Estrellas
1.5k
Forks
73
Merge medio
1 d 8 h
PR fusionados (30 d)
7

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-stack

Todos los issues de github/gh-stack

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.