split up a repository
Hi all,
Ok, I *WAS* an SVN user, so forgive my ignorance. I have successfully migrated from SVN to git. However, I had only one repository under my SVN server, which is not a good approach with git.
http://logonex.eu/git/?p=svn.git;a=summary
Now I have one git repository, which I'd like to split up to several others. Does it possible with git? If it is, how?
How can I split up a single repo to several others? It would be nice to keep the history.
Thank you for your help in advance.
Levente
Hi,
Quoted 11 lines · Levente
Hi all,
Ok, I *WAS* an SVN user, so forgive my ignorance. I have successfully migrated from SVN to git. However, I had only one repository under my SVN server, which is not a good approach with git.
http://logonex.eu/git/?p=svn.git;a=summary
Now I have one git repository, which I'd like to split up to several others. Does it possible with git? If it is, how?
Quoted 7 lines
How can I split up a single repo to several others? It would be nice to keep the history.
Thank you for your help in advance.
Levente
--
'git filter-branch' should do what you need. Have a read of this [1] recent discussion and the docs for filter-branch [2].
[1] http://thread.gmane.org/gmane.comp.version-control.git/138382
[2] http://www.kernel.org/pub/software/scm/git/docs/v1.7.0.1/git-filter-branch.html
Heya,
Quoted 2 lines · Levente
How can I split up a single repo to several others? It would be nice to keep the history.
Sounds like a job for.... subtree man! Avery (cc-ed) has written a program 'git subtree' that lets you split off subtrees from a git repository (and optionally merge them back later on). I reckon that's what you want, yes?
Signature · 3 lines
Cheers, Sverre Rabbelier
Quoted 1 line · On Tue, 2 Mar 2010 11:40:41 +0100 Sverre Rabbelier <[email protected]> wrote:
Sounds like a job for.... subtree man!
Yes, it seems!
Ok. Really newbie question here. Just before I start to mess up my repositories. I've cloned the git-subtree, and the install script would put the script into /usr/lib/git-core. Is there any way to install the script somewhere under /usr/local ?
Thanks,
Signature · 6 lines
Levente Kovacs http://logonex.eu -- Levente Kovacs http://logonex.eu
Quoted 5 lines · Levente Kovacs
On Tue, 2 Mar 2010 11:40:41 +0100
Ok. Really newbie question here. Just before I start to mess up my repositories. I've cloned the git-subtree, and the install script would put the script into/usr/lib/git-core. Is there any way to install the script somewhere under/usr/local?
The actual function of git-subtree is one single file. You can just copy it to wherever you like. Personally, I add the git-subtree source directory to my PATH from .bashrc... but I guess I'm special because I also change my version of git-subtree a lot :)
Make sure to run 'make test' first so you know it's working on your computer.
And I'll second Sverre's suggestion to *always* back up your repository before doing weird stuff (although git-subtree is designed to refuse to overwrite existing branches, and nobody has ever reported it damaging anything).
Have fun,
Avery
Quoted 8 lines · On Tuesday, March 2, 2010 at 20:40:57 (-0500) Avery Pennarun writes:
Quoted 5 lines · Levente Kovacs
On Tue, 2 Mar 2010 11:40:41 +0100
Ok. Really newbie question here. Just before I start to mess up my repositories. I've cloned the git-subtree, and the install script would put the script into/usr/lib/git-core. Is there any way to install the script somewhere under/usr/local?The actual function of git-subtree is one single file....
Does git-subtree support branching of the "main" repository and sub-trees in coordinated (one step) fashion?
Bill
Quoted 2 lines · Bill Lear
Does git-subtree support branching of the "main" repository and sub-trees in coordinated (one step) fashion?
Yes.
Avery
Heya,
Quoted 2 lines · Levente Kovacs
Ok. Really newbie question here. Just before I start to mess up my repositories.
PROTIP: Back up your repository before messing with it ;).
Quoted 3 lines
I've cloned the git-subtree, and the install script would put the script into
/usr/lib/git-core. Is there any way to install the script somewhere under/usr/local?
I'll leave git subtree specific questions to Avery :).
Signature · 3 lines
Cheers, Sverre Rabbelier