Migrating from svn to git
martin f krafft
madduck at madduck.net
Thu Feb 12 22:15:28 CET 2009
also sprach Chanoch (Ken) Bloom <kbloom at gmail.com> [2009.02.12.1727 +0100]:
> 1. Some subdirectories have a quite long revision history. If, in the
> future, I find myself checking out onto a low-bandwith computer, or
> space-limited computer, or I just don't want the whole revision history
> for some reason, I can use "git clone --depth" to get a history horizon
> on the git repository.
If you use --depth, you get an "inferior" repository, which won't
allow you to use the Git feature set. So I'd say: no.
On the other hand, if you use git-repack on the server, it probably
squashes all of your history to the smallest possible size, so you
probably won't take much of a hit.
> The docs say that if I do this, then I can't push from (or pull
> from) the shallow repository. However my tests indicate otherwise.
> What's the real restriction? Do I just have to make sure both
> branches involved in the push operation have history that goes
> back to the point where they diverge, or is something else going
> on here?
It's something like that, yes, purely technical. This is to say that
git does not prohibit you to do anything just because you made
a shallow clone. If you can stay on top of things, then do it. You
can always later get a full repo, after all.
But if you want the gory details, I suggest you better ask the Git
mailing list.
> 2. A couple of my subdirectory repositories have subdirectories
> that should themselves be omitted (or split off into directories
> of their own). Is there some way to filter out these
> subdirectories when doing the conversion or to filter them out
> immediately afterward?
With Git, you version full trees. If you want to discard a subtree,
commit its removal, which will become part of the history. If you
can't live with that, use git-filter-branch to rewrite the entire
history. Since you cannot rewrite history, it seems like you should
not, even though Git gives you the tools. Who knows, maybe later you
find you do need a subdirectory back...
--
martin | http://madduck.net/ | http://two.sentenc.es/
"never try to explain computers to a layman.
it's easier to explain sex to a virgin."
-- robert heinlein
(note, however, that virgins tend to know a lot about computers.)
spamtraps: madduck.bogus at madduck.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
URL: <http://lists.madduck.net/pipermail/vcs-home/attachments/20090212/b6411464/attachment.pgp>
More information about the vcs-home
mailing list