Re: [FEATURE] Proposal: git stash --only-unstaged
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 13, 2025, 15:30 UTC
- Message-ID
- <xmqqjz37nss7.fsf@gitster.g>
- In-Reply-To
- <12fe17735317215aa0de58a20055193a@dettweb.de>
"J. Dettweiler" <git.vger.kernel.org@dettweb.de> writes:
Show 19 quoted lines
> **Proposed feature:** > A new option, for example: git stash push --only-unstaged > > --- > > This would: > - Save only the unstaged working tree changes to the stash. > - Leave the index both in the working directory and completely absent > from the stash object. > - Make `stash pop` safe even if the index has changed in the meantime. > > --- > > **Benefits:** > - Cleaner workflows for splitting commits during interactive rebases. > - Safer testing of staged changes in isolation. > - Avoids unnecessary conflicts on stash pop. > > ---
What is the downside? If the users of "git stash --keep" can keep using the same workflow by switching to this new option, you wouldn't be proposing it as a separate option---rather you would be proposing an improvement to the "--keep" option. So there must be something that the users would have to do differently if they switch to this new "feature", but it is unclear what that is.