From: Felipe Contreras <felipe.contreras@gmail.com>
To: Stefan Haller <lists@haller-berlin.de>,
Kristoffer Haugsbakk <code@khaugsbakk.name>
Cc: Derrick Stolee <derrickstolee@github.com>,
Elijah Newren <newren@gmail.com>,
Phillip Wood <phillip.wood123@gmail.com>,
git@vger.kernel.org
Subject: Re: Should --update-refs exclude refs pointing to the current HEAD?
Date: Mon, 17 Apr 2023 20:00:34 -0600 [thread overview]
Message-ID: <643df9c257293_19bb0294b7@chronos.notmuch> (raw)
In-Reply-To: <6a8b92d8-5b86-9cf3-3619-4c8bedfa2d47@haller-berlin.de>
Stefan Haller wrote:
> On 17.04.23 10:34, Kristoffer Haugsbakk wrote:
> > On Mon, Apr 17, 2023, at 10:21, Stefan Haller wrote:
> >> 2. I have a topic branch, and I want to make a copy of it to make some
> >> heavy history rewriting experiments. Again, my interactive rebases would
> >> always rebase both branches in the same way, not what I want. In this
> >> case I could work around it by doing the experiments on the original
> >> branch, creating a tag beforehand that I could reset back to if the
> >> experiments fail. But maybe I do want to keep both branches around for a
> >> while for some reason.
> >
> > I would use a lightweight tag, too, since this option doesn’t touch tags.[1]
> >
> > Why do you want to keep both branches around?
>
> Several reasons:
>
> Maybe the original branch was pushed already, and I'm collaborating on
> it with a coworker. At the same time, I want to run my rebase experiment
> in parallel on a copy.
>
> Maybe I want to create github PRs for both of them, in order to run CI
> on them, or get feedback for both of them from my coworkers.
>
> Also, it just seems to be the most natural workflow for many people. I
> have seen my coworkers do this a lot without thinking much whether there
> would be a better way.
I also do this, however, I often create a new branch to point to the previous
one (`git branch foo-1`). I know I can refer to it with `foo@{1}`, but then I
have to keep track if I rebase more than once, or do any other reflog
operation.
If I've sent the series for review with my tool `git send-series`, then I don't
have to worry about that because I have refs for every version I sent.
A notion of branch versions really comes in handy.
Cheers.
--
Felipe Contreras
next prev parent reply other threads:[~2023-04-18 2:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 8:21 Should --update-refs exclude refs pointing to the current HEAD? Stefan Haller
2023-04-17 8:30 ` Stefan Haller
2023-04-17 8:34 ` Kristoffer Haugsbakk
2023-04-17 9:22 ` Stefan Haller
2023-04-18 2:00 ` Felipe Contreras [this message]
2023-04-17 12:14 ` Phillip Wood
2023-04-20 15:27 ` Stefan Haller
2024-03-05 7:40 ` Stefan Haller
2024-03-05 16:22 ` Junio C Hamano
2024-03-06 2:57 ` Elijah Newren
2024-03-06 21:00 ` Stefan Haller
2024-03-07 5:36 ` Elijah Newren
2024-03-07 20:16 ` Stefan Haller
2024-03-09 3:28 ` Elijah Newren
2024-03-12 9:28 ` Stefan Haller
2024-03-07 7:59 ` Kristoffer Haugsbakk
2024-03-07 8:22 ` Elijah Newren
2024-03-24 10:42 ` Stefan Haller
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=643df9c257293_19bb0294b7@chronos.notmuch \
--to=felipe.contreras@gmail.com \
--cc=code@khaugsbakk.name \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=lists@haller-berlin.de \
--cc=newren@gmail.com \
--cc=phillip.wood123@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).