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

`gh stack sync` can't be run anywhere in the repository

Open
#483 1 comment 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
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
cli

Research direction

Start at the gh stack sync command and inspect how it validates the current branch, along with the .git/gh-stack state used by stacked repositories. Run the command from a branch that is not part of a stack; done means synchronization can proceed there, including cleanup after a merged local branch.

Written by the indexing model from the issue text.

Description

If you're on a repository that uses Stacked PRs, but you're not on a branch that's currently stacked, you see:

% gh stack sync
✗ current branch "fix/number" is not part of a stack
Checkout an existing stack using `gh stack checkout` or create a new stack using `gh stack init`

This means that if you want to leverage .git/gh-stack as the internal state for what branches are available, you need to now go onto a stacked branch to sync.

There should be a way to sync without necessarily being on a stacked branch (for instance, if you want to make sure that your local branch is cleaned up after it's been merged)

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.