github / github/gh-stack

gh stack modify fails with untracked files

Open Beginner friendly
#111 4 comments 6 reactions 0 assignees View on GitHub
bug topic: cli - modify
Dominant language
Go
Stars
1.5k
Forks
70
Avg merge
1d 8h
Merged PRs (30d)
7

Description

`gh stack modify` preconditions fail if the current working directory has any untracked files and fails with the following message that seems to imply that untracked changes shouldn't be a problem, as there is nothing to stash or commit.

```
✗ uncommitted changes in working tree
Commit or stash your changes before running modify
```

Code that performs the check: https://github.com/github/gh-stack/blob/5ed5693ed6fcfa34228312abb09553e2580b6670/internal/git/gitops.go#L576

Perhaps this should ignore any lines starting with `?? `?

Contributor guide

Open the contributing guide

Research direction

Start in internal/git/gitops.go around the precondition check at line 576 and reproduce the failure with an untracked file in the working directory. Inspect how Git status output is classified, then verify that untracked files no longer block `gh stack modify` while genuinely uncommitted changes still do.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.