Skip to content

fix(push): ensure branches are rebased before pushing#12

Closed
boneskull wants to merge 1 commit intomainfrom
push-updates
Closed

fix(push): ensure branches are rebased before pushing#12
boneskull wants to merge 1 commit intomainfrom
push-updates

Conversation

@boneskull
Copy link
Copy Markdown
Owner

No description provided.

@boneskull
Copy link
Copy Markdown
Owner Author

Stack


Managed by gh-stack

Copilot AI review requested due to automatic review settings January 30, 2026 04:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds validation to ensure branches are properly rebased onto their parents before pushing. This prevents pushing stale branches that haven't incorporated changes from their parent branches.

Changes:

  • Added pre-push validation that checks if each branch in the stack is properly rebased onto its parent
  • Returns a helpful error message directing users to run gh stack cascade if a branch needs rebasing
  • Added comprehensive end-to-end test coverage for the new validation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cmd/push.go Added validation loop before pushing to check if each branch is properly rebased onto its parent, returning an actionable error if not
e2e/push_test.go Added test case that verifies push fails with appropriate error message when a branch is not rebased onto its parent

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants