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

Re: interactive rebase results across shared histories

From
SSeb <spluque@gmail.com>
Date
Feb 21, 2016, 17:25 UTC
Message-ID
<8737sm6kmk.fsf@gmail.com>
In-Reply-To
<56C91D21.90306@moritzneeb.de>

On Sun, 21 Feb 2016 03:12:49 +0100, Moritz Neeb <lists@moritzneeb.de> wrote:

> Hi Seb,
> On 02/20/2016 11:58 PM, Seb wrote:
>> Hello,
Show 7 quoted lines
>> I've recently learnt how to consolidate and clean up the master
>> branch's commit history.  I've squashed/fixuped many commits thinking
>> these would propagate to the children branches with whom it shares
>> the earlier parts of the its history.  However, this is not the case;
>> switching to the child branch still shows the non-rebased (dirty)
>> commit history from master.  Am I misunderstanding something with
>> this?
> I am not sure what you meand by "child branch". If I understand
> corretly, you have something like:
>             A---B---C topic
>            /
>       D---E---F---G master

Thanks Moritz and sorry for not adequately describing the situation. The scenario is much simpler; imagine master has a longer history behind the point where the topic branch started:

                A---B---C topic
               /
  *---D---E---F---G master

And we want to keep both branches separate (no desire to merge them for now), but we realize that, say, commits D and E should be squashed/fixup, so we do an interactive rebase. Now, the problem is that if I do that from the topic branch, the results are not reflected in the master branch, even though these commits are certainly shared with master. It seems counterintuitive that a part of history that is shared among branches can be independently manipulated/rewritten with rebase. I must be missing something...

-- 
Seb
Previous: Moritz NeebNext: Eric Sunshine
Message 3 of 13 in “interactive rebase results across shared histories”
  1. SebFeb 20, 2016
  2. Moritz NeebFeb 21, 2016
  3. SebFeb 21, 2016
  4. Eric SunshineFeb 21, 2016
  5. SebFeb 22, 2016
  6. DavidFeb 22, 2016
  7. SebFeb 23, 2016
  8. Moritz NeebFeb 23, 2016
  9. Kevin DaudtFeb 23, 2016
  10. SebFeb 23, 2016
  11. DavidFeb 26, 2016
  12. SebFeb 26, 2016
  13. Stepan KasalFeb 26, 2016

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.