github / github/gh-stack

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

Open
#483 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.5k
Forks
70
Avg merge
1d 8h
Merged PRs (30d)
7

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)

Contributor guide

Open the contributing guide

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.