git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] git stash: add porcelain for sharing stashes through remotes

From
Hanan Arshad <hananarshad619@gmail.com>
Date
Sep 28, 2026, 14:27 UTC
Message-ID
<CAKPibBw2XxjGpE_DZrWLZmMHs7kAyvOaP8504kfoh61c4UkGyg@mail.gmail.com>
Hi,

I'd like to propose adding a small porcelain workflow for sharing stashes through a Git remote.

git stash export and git stash import already provide a transportable representation of stashes. I tested the following workflow using existing commands:

Alice:
  git stash export --print stash@{0}
  git push origin <export-tip>:refs/stashes/alice/wip
Bob:
  git fetch origin refs/stashes/alice/wip:refs/shared-stashes/origin/alice/wip
  git stash import refs/shared-stashes/origin/alice/wip
The imported stash is a normal local stash and retains the original
stash object ID. Removing the remote ref afterward does not affect
Bob's imported stash.
I'd like to add porcelain around this existing mechanism for four operations:

1- publish a selected stash to a remote 2- list available shared stashes 3- get a shared stash as a normal local stash 4- remove a shared stash from the remote

This would not introduce a new stash object format, server-side service, or synchronization model. It would essentially compose the existing export/import mechanism with normal push/fetch operations. Before working on an implementation, I'd appreciate feedback on a few design points: 1- What remote ref namespace would be appropriate? 2- Should shared stashes use an explicit user-provided name or an object-derived identifier? 3- Should listing only inspect remote refs, or fetch the export commits so stash messages can also be displayed? 4- What command naming would fit best with the existing git stash interface?

If the general direction seems reasonable, I can follow up with a more concrete interface and implementation.

Thanks, Hanan Arshad

Next: brian m. carlson
Message 1 of 10 in “[RFC] git stash: add porcelain for sharing stashes through remotes”
  1. Hanan ArshadSep 28, 2026
  2. brian m. carlsonSep 29, 2026
  3. Hanan ArshadOct 5, 2026
  4. Johannes SixtOct 5, 2026
  5. Hanan ArshadOct 5, 2026
  6. Johannes SixtOct 5, 2026
  7. Hanan ArshadOct 5, 2026
  8. Junio C HamanoOct 5, 2026
  9. Hanan ArshadOct 7, 2026
  10. Johannes SixtOct 7, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.