threads / bug / 63376

Re: Possible BUG: git stash -m picks branch name from submodule

Subject: Re: Possible BUG: git stash -m picks branch name from submodule

## tl;dr

One message between Apr 30, 2025 and Apr 30, 2025.

replies: 0people: 1as markdown or json

Alex Arques· Apr 30, 2025, 14:05 UTC · lore
I also encountered this today on “git version 2.49.0.windows.1” in a repository with two submodules, both which are set up to track “master”.

Whenever I do “git stash push” with a message on the main repository my stash message seems to be prepended with “On master: “. This only works correctly if I omit the “-m” or “—message” part of “git stash push”.

git stash with no arguments outputs this: Saved working directory and index state WIP on <current branch>

While git stash -m “[…]” outputs this: Saved working directory and index state On master: […]

Which is not what I want because “git stash list” now gives me confusing output. It seems like I have encountered the same bug? <current branch> on the main repository is NOT “master”.

← back to recent threads