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

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

From
Johannes Sixt <j6t@kdbg.org>
Date
Oct 7, 2026, 10:36 UTC
Message-ID
<09ed5eac-b9fc-4927-8425-1d17b599b73b@kdbg.org>
In-Reply-To
<20261007063155.4573-1-hananarshad619@gmail.com>
Am 07.10.26 um 08:31 schrieb Hanan Arshad:
Show 11 quoted lines
> A tester may need to apply the same configuration while testing
> different branches or revisions, for example:
> 
>     branch A       + configuration X
>     branch B       + configuration X
>     release branch + configuration X
> 
> Using a branch for configuration X makes it another line of history
> based on some revision. When the code being tested changes, that
> configuration then has to be merged, rebased, cherry-picked, or
> otherwise combined with the revision being tested.
You are overthinking the required workflow.

Nobody claims that you have to keep the configuration X change on an additional branch for each of the working branches. You would use a branch only to transfer the configuration X change to other clones. You don't work on that branch.

In the repository that wants to publish configuration X, you commit the modifications on ONE branch (doesn't matter which one, say "release"):

	git switch -c configuration-X
	git commit -m"configuration X" -a  # or the config file name
	git push origin +configuration-X
	git checkout release

At this point the state is as if you had run `git stash push` on branch "release", except the change is on a branch, not in a stash.

Then while on the first branch in a new (or old) clone that needs configuration X, you run

	git fetch origin
	git show origin/configuration-X | git apply -3

ONCE, which leaves the modifications uncommitted (if there are no conflicts). From here on, you would use the local stash to transfer the modifications to other branches, just as you would have done with a transferred stash.

-- Hannes
Previous: Hanan Arshad
Message 10 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.