Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

sync reports success (exit 0) when its internal push fails

Open
#472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
git, go
Domain
cli

Research direction

Start at the gh stack sync command and trace how the internal push result is handled after a rebased stack requires a force push. Reproduce the reported scenario, then verify that a failed push cannot produce a successful sync result or exit code; add or update a regression test if the surrounding command tests provide one.

Written by the indexing model from the issue text.

Description

(This issue was AI generated but I have read it, understood it, and I'm accountable for its content.)

Version: gh-stack v0.1.0.

Repro: a stack whose branches are already pushed; rebase the stack locally (tips now require a force-push); run gh stack sync.

Actual output:

Pushing 3 branches to origin...
⚠ Push failed — branches may need force push after rebase
  Run `gh stack push` to push with --force-with-lease.
...
✓ Stack synced

with exit code 0, while the branches were not pushed.

Expected: either sync pushes with --force-with-lease --atomic as its own documentation describes (step 5 of the sync help text), or the run exits non-zero when the push step fails. A warning followed by a success line and a zero exit makes sync unusable in scripts and easy to misread interactively.

Dominant language
Go
Stars
1.5k
Forks
73
Avg merge
1d 8h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-stack

All issues in github/gh-stack

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.