From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Advice on converting to git from versioning-by-directory
Date: Thu, 23 Nov 2006 09:16:44 +0000 [thread overview]
Message-ID: <200611230916.46415.andyparkins@gmail.com> (raw)
Hello,
This is an overly long email, please don't waste your time unless you're
interested in git-based puzzles. I'm only really trying to solve the problem
for fun. (This is what I do for fun now? Oh dear).
I'm in the process of converting a colleague to using git for his project.
Previously it was stored in subversion - but was only really used as a backup
system, history is entirely linear and there are no merges and no branches.
Branching was effectively done by copying directories. So the history went
like this:
* version1/ created and worked on with regular commits
* version2/ created as a copy of version 1
* version2/ worked on with regular commits
* occasional commits in version1/
* version3/ created as a copy of version2/ and worked on
* version4/ created as a copy of version2/ and worked on
I simply converted the subversion repository to git and then used a bit of
rebase and cherry-pick work to put each commit in a particular directory in
its correct branch.
* -- * -- * -- * -- * version1
\
* -- * -- * version2
|\
| * -- * version3
\
* -- * version4
This is pretty good. It's certainly a huge improvement over what there was.
However, it's still not quite what I want. The problem is that I haven't
done any directory reorganising so now this is a mixed version-by-directory
and version-by-branch repository. For example the version4 branch, because
it came from version2, which came from version1 contains directories
version1/, version2/ and version4/.
This makes merging changes impossible, a bug fix in version1, when pulled into
version4 simply goes in version4's version1/ directory - obviously not what
would be wanted.
Phew; still with me? Obviously what I would like is to remove each
subdirectory, and have all the branching done using git. However, I'd like
to keep the history so far for each branch.
What should I do? I've thought of a number of things:
* Recreate the whole lot by hand, the repository isn't huge and I could
manually apply each commit as a patch in the correct place. It would be a
bit time-consuming but would mean I'd have what I wanted
* Keep the current history and move and remove files out of each branch to
make it look like I want it now, and allow history to be a bit of a mess.
* As I make each branch reorganise it early on, _then_ apply the history of
each branch to the right branch.
I'm tempted to go with recreate by hand, as that has the fewest compromises.
Before I did that though I thought I'd ask you clever chaps to see if you had
any amazing ideas :-)
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
next reply other threads:[~2006-11-23 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 9:16 Andy Parkins [this message]
2006-11-23 9:58 ` Advice on converting to git from versioning-by-directory Andy Whitcroft
2006-11-23 10:09 ` Andy Parkins
2006-11-23 10:07 ` Jeff King
2006-11-23 11:02 ` Andy Parkins
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=200611230916.46415.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).