Bug: `git_status` shows non-existing untracked file
Author: chrisgrieserCreated Aug 4, 2025Updated Sep 27, 2026
Labels🐛 bug
Current Behavior
git_status shows non-existing untracked file. The module indicates there is one untracked fille, however git status --untracked-files=all does not show any such file.
git add -all or git clean -df ; git reset ---hard which should get rid of untracked files, do not make a difference, starship still displays one untracked file. The problem only occurs in one specific repo of mine, not in any other repo.
Other things I have tried, all of which did not help:
git gc- Running
env STARSHIP_LOG=trace starship module git_status. The log reports a git command which I then ran, but it does not output anything, so I am not even sure whether that's the correct command there in the log. - re-cloning (deleting the repo and cloning again).
git_statuskeeps reporting one untracked file on a fresh clone. - checking out a commit a year ago, where I am sure that there was no untracked file.
- re-installing starship
Expected Behavior
git_status should not show non-existing files
Additional context/Screenshots
This seems to be related to #2912, since setting status.showUntrackedFiles=no in my global git config does hide the file (and all other actually existing untracked file)
Environment
- Starship version: 1.23.0
- zsh version: zsh 5.9 (arm64-apple-darwin24.0)
- Operating system: Mac OS 15.5.0
- Terminal emulator: WezTerm 20240203-110809-5046fc22
- Git Commit Hash:
- Branch/Tag:
- Rust Version: rustc 1.86.0 (05f9846f8 2025-03-31) (Homebrew)
- Rust channel: release
- Build Time: 2025-04-27 15:52:14 +00:00
Relevant Shell Configuration
<unknown config>Starship Configuration
could reproduce with a minimal config such as this:
format = "$directory$git_status$character"
[git_status]
untracked = "?$count "
format = "$untracked"Source: starship/starship