Re: [git-users] How to convert SVN tags to Git
On Tue, 22 Jan 2013 04:53:30 -0800 (PST) Luís de Sousa wrote: > > Hence git-svn creates one remote branch in your local repository > > for each "tag" in the Subversion repository. [...] > As I wrote initially, *git svn clone* doesn't create any branches: > > $ git branch -r > git-svn > > Can these branches be created after the *clone* command? `git svn clone` is `git svn init` + `git svn fetch`, so I assume they should be. At least it worked for me several times I did conversions. I think you should tinker with the options specifying repository layout, such as "--tags=...". My Subversion repos always had "standard" layout (as recommended in the book) so I used "--stdlayout" with `git svn init`; in your case a more complicated setup is called for. --
Re: [git-users] How to convert SVN tags to Git
On Tuesday, 22 January 2013 13:10:02 UTC+1, Konstantin Khomoutov wrote: > > Hence git-svn creates one remote branch in your local repository for > each "tag" in the Subversion repository. > Hi Konstatin, thanks for the reply. As I wrote initially, *git svn clone* doesn't create any branches: $ git branch -r git-svn Can these branches be created after the *clone* command? Thank you, Luís --
Re: [git-users] How to convert SVN tags to Git
On Tue, 22 Jan 2013 02:11:00 -0800 (PST) Luís de Sousa wrote: > Dear all, > > I have a basic SVN repo with a few tags marking code releases > organised the following way: > > /src > /releases >/0.1 >/0.2 >/0.3 > > > Where *src* is the trunk and all sub-folders of *releases* are tags > created with *svn copy*. I've managed to migrate this repo using *git > svn*, but the tags are not recognised as tags nor branches, git svn > simply replicates the folder structure. I hape tried *svn2git*, but > it doesn work on my system[1]. I've also tried some tutorials[2], but > these don't seem to apply to my particular repo structure. Since Subversion does not really have tags, only named versioned folders, there's no one-to-one mapping from Subversion tags to Git's. Hence git-svn creates one remote branch in your local repository for each "tag" in the Subversion repository. If you're certain about converting the fetched history to Git (so that you will be using Git only and won't commit to that Subversion repo), then you have to create a real Git tag in your repo for each remote branch related to a tag in the source Subversion repo. This is best done with `git for-each-ref` and a bit of shell scripting. Something like this: $ git for-each-ref 'refs/remotes/releases/*' | while read sha _ ref; \ do git tag ${ref##*/} $sha && git branch -d "$ref"; done This would create tags named "0.1", "0.2" etc out of those remote branches. Of course, investigate your particular case first (like at least run `git branch -r` to verify you do really have branches named after "release/1.0" there etc. --
[git-users] How to convert SVN tags to Git
Dear all, I have a basic SVN repo with a few tags marking code releases organised the following way: /src /releases /0.1 /0.2 /0.3 Where *src* is the trunk and all sub-folders of *releases* are tags created with *svn copy*. I've managed to migrate this repo using *git svn*, but the tags are not recognised as tags nor branches, git svn simply replicates the folder structure. I hape tried *svn2git*, but it doesn work on my system[1]. I've also tried some tutorials[2], but these don't seem to apply to my particular repo structure. What would be correct procedure on this case? Thank you, Luís [1] https://github.com/nirvdrum/svn2git/issues/101 [2] http://john.albin.net/git/convert-subversion-to-git --