From: George Spelvin <lkml@SDF.ORG> To: Sebastien Bruckert <firstname.lastname@example.org> Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, Junio C Hamano <email@example.com>, firstname.lastname@example.org, email@example.com Subject: Re: Feature request: rebase -i inside of rebase -i Date: Tue, 7 Apr 2020 19:03:39 +0000 Message-ID: <20200407190339.GA20902@SDF.ORG> (raw) In-Reply-To: <CA+KXf2A7L1fRC3+rmDaME186CYf4yS+-dBgy_FkEFVh887N7MA@mail.gmail.com> On Tue, Apr 07, 2020 at 05:16:50AM -0400, Sebastien Bruckert wrote: > Hmmm so you need some way to move C before your actual commit. To make > it like a pseudo command, some kind of "git rebase --reattach C > --after A"? This seems closer to your original idea. That seems too special-purpose and hard to remember. The standard rebase -i operation (generate a todo list and drop me into an editor) is perfectly adequate and more familiar. This is a very manual operation, after all. ("-i" for "interactive" means "manual".) > Or why not modify "--edit-todo" to get commits from before your actual > point? It could works like this: > > Before: > ``` > #pick b2a96fe O > #pick acb7459 A > #pick 0dac4a4 B > edit 1f54e51 C > edit cda2a7e D > ``` > > After: > ``` > #pick b2a96fe O > edit 1f54e51 C > pick acb7459 A > pick 0dac4a4 B > edit cda2a7e D > ``` > > So that you are still at C, but keeping the changes you made before on > A and B, and going through them only if you have conflicts. Because the only reason this is interesting assumes that A and B have changed! If I didn't intend to modify A somehow, I wouldn't have included it in the rebase range. They're now edited patches A' and B'. So the state I want to get to is: #pick b2a96fe O #pick acb7459 A #pick 0dac4a4 B reset b2a96fe O edit 1f54e51 C pick 7f0bcab A' pick fcd3c62 B' edit cda2a7e D where it will pick the versions of A and B that include the edits I've already made. Now, having the original commits mentioned in comments is useful, in case I made a mess of the edit and want to revert it. E.g. I can certainly see realizing, three commits later in the rebase, that I recolved a conflict wrong and should re-do it. Although this can probably be handled with a fixup.
next prev parent reply index Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-20 22:30 George Spelvin 2020-03-20 22:51 ` Junio C Hamano 2020-03-20 23:35 ` George Spelvin 2020-03-21 10:51 ` Johannes Schindelin 2020-03-21 17:56 ` George Spelvin 2020-03-25 19:26 ` Johannes Schindelin 2020-03-26 0:18 ` George Spelvin 2020-03-28 14:25 ` Johannes Schindelin 2020-03-28 16:30 ` George Spelvin 2020-03-31 0:00 ` George Spelvin 2020-03-31 10:57 ` Philip Oakley 2020-03-31 13:36 ` Phillip Wood 2020-04-01 16:43 ` Philip Oakley 2020-04-07 15:54 ` Phillip Wood 2020-04-04 12:17 ` Johannes Schindelin 2020-04-04 12:39 ` Johannes Schindelin 2020-04-04 17:41 ` George Spelvin 2020-04-06 10:40 ` Sebastien Bruckert 2020-04-06 15:24 ` George Spelvin 2020-04-07 9:16 ` Sebastien Bruckert 2020-04-07 19:03 ` George Spelvin [this message] 2020-03-30 14:01 ` Philip Oakley 2020-03-30 18:18 ` George Spelvin 2020-03-30 21:53 ` Philip Oakley 2020-03-21 8:47 ` Johannes Sixt
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=20200407190339.GA20902@SDF.ORG \ --firstname.lastname@example.org \ --cc=Johannes.Schindelin@gmx.de \ --email@example.com \ --firstname.lastname@example.org \ --email@example.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
Git Mailing List Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/git/0 git/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 git git/ https://lore.kernel.org/git \ firstname.lastname@example.org public-inbox-index git Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git