Skip to content

[UX] Pressing 's' to stash untracked files accepts a name but silently does nothing #5883

Description

@ThatOn3Gu7

Hey maintainers! I wanted to bring up a minor UX papercut that keeps tripping me up when working with untracked files. Not sure if anyone else has reported this yet, but thought I'd drop it here to see what you think!

What's happening?

When I have an untracked file and press s to stash, Lazygit opens the "Stash name" popup as if everything is good to go. But after typing a name and hitting Enter, the popup simply closes and nothing happens—the file remains untracked, no stash is created, and there’s no toast or error message explaining why.

Since standard git stash ignores untracked files by default, it makes sense why it fails under the hood. However, because the name prompt still appears, it feels like it should work, making the silent failure a bit confusing (until you remember that Shift+S is what you actually needed!).

Steps to recreate

  1. Create a brand-new untracked file in a repo (with no other tracked changes).
  2. Focus the untracked file in the Files panel and press s.
  3. Type a stash name and hit Enter.
  4. Notice the prompt disappears, but the file isn't stashed and no notification pops up.

Possible ideas

Not sure what the cleanest fix would be, but a few ideas:

  • Toast/Error Tip: Display a quick toast/error saying untracked files can't be stashed with s, pointing the user toward Shift+S instead.
  • Fallback Prompt: Prompt to stash untracked files (git stash --include-untracked) if no tracked files are present.
  • Disable Prompt: Prevent the name prompt from appearing if there are no stashable (tracked) changes available.

Appreciate all the work on Lazygit!

Environment

  • Lazygit Version: v0.63.1 (build date: 2026-07-15T12:40:17Z, source: termux)
  • Git Version: 2.55.0
  • OS: Termux (Android, arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions