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

Rebase & submodules

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Sep 14, 2017, 15:39 UTC
Message-ID
<CAHd499ApnHpt0CmcQMx+qVQ60NV6auFKkuvikCq2Zut4p4rzaQ@mail.gmail.com>

So I often will have a submodule that points to one of my own forks, because I will have work done on a feature branch that hasn't been merged upstream yet. Assuming this merge takes a long time to get approved, I will occasionally rebase my topic branch to keep things up to date and clean.

However, any previous commits in my parent repository that refer to a SHA1 prior to the rebase will now be pointing to dangling/orphaned commits, which means I wouldn't be able to go back to that commit in history and do `git submodule update` since that checkout will fail.

One obvious solution to this is: Don't rebase. But, this could result in a lot of merging between the upstream and my fork which would make things not only ugly, but prevent me from making a pull request that makes sense to the upstream repository (They'd likely request a rebase in order to accept the PR, which I wouldn't be able to do for the reasons outlined above).

Are there any other workflows that would support this kind of model better?
Next: Nicolas Morey-Chaisemartin
Message 1 of 3 in “Rebase & submodules”
  1. Robert DaileySep 14, 2017
  2. Nicolas Morey-ChaisemartinSep 14, 2017
  3. Robert DaileySep 14, 2017

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.