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

Merging topic branches -- changed file locations.

From
Thomas Adam <thomas@xteddy.org>
Date
Sep 2, 2010, 09:51 UTC
Message-ID
<AANLkTim_UkTMJdZCBpzGrXvo2L2uzL5H4QY2aYaLZw-3@mail.gmail.com>
Hello all,

I'm wondering what people do in the following situation, involving integration branches, topic branches, and directory renames.

We use a workflow, whereby people develop features in local topic branches, and then merge them into designate integration branches. So for instance, given a public integration branch:

integration/foo
and a local topic branch of:
topic/foo
That topic/foo branch would get merged into integration/foo with:
git merge --no-ff integration/foo
... and the result pushed out.

This is working just fine -- except that recently, we had cause to "git mv" a directory -- the result of which has been merged and pushed out on "integration/foo". So for example, throughout the lifetime of "integration/foo", there has been a directory called:

modules/foo
Which has been renamed to:
modules/foo2

That's fine. But now, we've run into a problem, whereby people have local topic branches with outstanding changes on them that need merging to integration/foo. But the commits on these topic branches still have references to "modules/foo", which makes merging them in to the integration/foo branch almost impossible.

What's the best way of solving this? I blindly tested this, by doing a "git mv modules/foo modules/foo2" on "topic/foo" and trying to then merge the result of that to integration/foo -- but that didn't work very well either.

Any insight would be greatly appreciated.  I hope my ramblings make sense.
Kindly,
-- Thomas Adam
Message 1 of 1 in “Merging topic branches -- changed file locations.”
  1. Thomas AdamSep 2, 2010

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.