Skip to content

Error while unstaging files with whitespace characters in name #537

@max-gigi

Description

@max-gigi

Hey, I've noticed this issue while using gitu. I can stage files with whitespace characters in their name without issue, but when I try to unstage them I'm getting this error:

$ git restore --staged plans/2026-06-03 - safeguards plan splitting.md
error: pathspec 'plans/2026-06-03 - safeguards plan splitting.md' did not match any file(s) known to git
! 'git restore --staged plans/2026-06-03 - safeguards plan splitting.md' exited with code: 1

Seems to be a case of missing quotes around the filename. Running this command in the terminal works:

git restore --staged 'plans/2026-06-03 - safeguards plan splitting.md'

Running on macOS 26.5:

❯ gitu --version
gitu 0.42.0

Hope this is helpful.
Thanks for building this awesome tool!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions