From: Johannes Sixt <j6t@kdbg.org>
To: Hanan Arshad <hananarshad619@gmail.com>
Cc: git@vger.kernel.org, sandals@crustytoothpaste.net
Subject: Re: [RFC] git stash: add porcelain for sharing stashes through remotes
Date: Mon, 5 Oct 2026 09:47:20 +0200 [thread overview]
Message-ID: <e1635b9c-bc03-4835-805f-5fa52f09364d@kdbg.org> (raw)
In-Reply-To: <20261005055337.7579-1-hananarshad619@gmail.com>
Am 05.10.26 um 07:53 schrieb Hanan Arshad:
> The revised interface I have in mind is:
>
> Publish one stash to a user-selected remote ref:
>
> git stash publish <remote> <remote-ref> [<stash>]
I am actually not very happy with such an interface. The premise to have
it is that stashes are something that can (and should) be shared with
other people. But this is not the case. Stashes are strictly personal,
short-lived, work-in-progress-not-worth-to-be-committed states. If you
use stashes for longer-lived, worth-to-be-committed, sharable project
states, then you are doing something wrong. You should be using branch
labels instead.
>
> For example:
>
> git stash publish origin refs/stashes/hanan/fix-login stash@{0}
>
> If <stash> is omitted, stash@{0} would be used.
>
> Internally this would reuse the existing stash export mechanism and
> normal push machinery. The original local stash would remain unchanged.
There you have it. If a stash is worth to be shown, then do take the
long way via `git stash export`, and push the ref. Or just do
git push origin stash@{0}:refs/stashes/hanan/fix-login
There's no magic support needed (nor, IMHO, desired).
-- Hannes
next prev parent reply other threads:[~2026-10-05 7:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 14:27 [RFC] git stash: add porcelain for sharing stashes through remotes Hanan Arshad
2026-09-29 22:19 ` brian m. carlson
2026-10-05 5:53 ` Hanan Arshad
2026-10-05 7:47 ` Johannes Sixt [this message]
2026-10-05 8:03 ` Hanan Arshad
2026-10-05 8:21 ` Johannes Sixt
2026-10-05 9:06 ` Hanan Arshad
2026-10-05 15:25 ` Junio C Hamano
2026-10-07 6:31 ` Hanan Arshad
2026-10-07 10:36 ` Johannes Sixt
-- strict thread matches above, loose matches on Subject: below --
2026-10-01 8:53 Hanan Arshad
2026-10-01 22:02 ` D. Ben Knoble
2026-10-01 22:16 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1635b9c-bc03-4835-805f-5fa52f09364d@kdbg.org \
--to=j6t@kdbg.org \
--cc=git@vger.kernel.org \
--cc=hananarshad619@gmail.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox