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

Re: Big Mess--How to use Git to resolve

From
Randal L. Schwartz <merlyn@stonehenge.com>
Date
Dec 17, 2011, 15:33 UTC
Message-ID
<86iplf2oy5.fsf@red.stonehenge.com>
In-Reply-To
<1324125130643-7103964.post@n2.nabble.com>
>>>>> "hs" == hs glw <greg@hra.net> writes:

hs> Some clients have customizations of the code, some have version 5 of the hs> software others have 5.2, 5.5 etc.

Create an empty repo.

Unpack the oldest release (I presume you still have the tarballs) you might have forked a customer from. commit it, and tag it as v5.0 (or whatever it is).

In the same dir, delete the files, and unpack the *next* release. git add . again, and commit that, effectively recording the changes from one release to the next. Tag it v5.1 or whatever.

Repeat for all releases.
git branch -m master release
That will remain your untouched release branch.

Now, take customer1. Figure out which release is closest to their modified code. Let's say it's v5.2

git checkout -b customer1 v5.2

erase the files, copy their work in, and commit. You'll now have a customer1 branch that comes off the right release.

repeat for each customer.

So now you have tags for each release, and every customer's code checked in somewhere.

If you feel brave, you can try to move a customer to a later release:

git checkout customer1 git rebase v5.5

That will try to apply the diff between v5.2 and customer1 directly to the top of v5.5. Might fail, might need some mopping up. But at least the hard work is done.

Hope this helps.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
Previous: hs_glwNext: hs_glw
Message 2 of 7 in “Big Mess--How to use Git to resolve”
  1. hs_glwDec 17, 2011
  2. Randal L. SchwartzDec 17, 2011
  3. hs_glwDec 17, 2011
  4. Holger HellmuthDec 19, 2011
  5. Neal KreitzingerDec 21, 2011
  6. Neal KreitzingerDec 21, 2011
  7. Seth RobertsonDec 21, 2011

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.