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

No way to delete a stack locally whose branches are deleted

Open
#439 0 comments 3 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
Quiet
Tech stack
git, github, go
Domain
cli

Research direction

Start at the gh stack unstack --local entry point and reproduce the failure after gh stack sync has pruned the stack branches. Trace how unstack handles missing local and remote branches, then verify that a stack with both kinds of branches deleted is removed without failing.

Written by the indexing model from the issue text.

Description

feature request topic: cli - other
Context

Our repo has the "Delete head on merge" option, which makes it so that when merging a stack from the GitHub website, the feature branches get deleted also.
Locally, I also ran gh stack sync which prompted me to prune the branches.

The stack remained for some reason (I see there's a related bug), so I tried to unstack it locally since it no longer existed on remote.

Issue / Feature request

I expected that gh stack unstack --local would destroy the stack even if the branches do not exist but it failed.

To clean my local repo, I had to re-create the branches in the stack with the same names and then unstack succeeded.

Is it possible to have unstack in the case where both the local & remote branches no longer exist to consider them pruned, skip them, and not fail?

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.