Git development
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Hanan Arshad <hananarshad619@gmail.com>
Cc: git@vger.kernel.org, sandals@crustytoothpaste.net, gitster@pobox.com
Subject: Re: [RFC] git stash: add porcelain for sharing stashes through remotes
Date: Wed, 7 Oct 2026 12:36:32 +0200	[thread overview]
Message-ID: <09ed5eac-b9fc-4927-8425-1d17b599b73b@kdbg.org> (raw)
In-Reply-To: <20261007063155.4573-1-hananarshad619@gmail.com>

Am 07.10.26 um 08:31 schrieb Hanan Arshad:
> 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


  reply	other threads:[~2026-10-07 10:36 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
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 [this message]
  -- 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=09ed5eac-b9fc-4927-8425-1d17b599b73b@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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