Creating Git repository from Talend source codes

One Star

Creating Git repository from Talend source codes

The most of the developers, who are working with talend sources without having access to Talend's subversion repository need to "clone" the existing trees to maintain their codes with the different tags and branches. For this, I think still git is the best tool, it can work together with subversion easily, fast and handles branches and tags as it should be. To create git repository from Talend subversion repository is easy, it requires the following steps:
1. The subversion repository must be cloned from talendforge. Since Talend guys did not allow to access subversion root directory (, you will need a git 1.7+ and the famous --no-minimize-url option. This example focuses on talend open profiler, but the method is the same for tos too.
$ mkdir top ; cd top
$ git svn init -R svn -Ttrunk -ttags -bbranches --no-minimize-url

$ git svn fetch svn

It will run for several hours, depending on your bandwidth and cpu power (git compresses the repo during the fetch). After you fetched, git svn already built a connection between your repository and Talend's repository, which means, that you can always get the changes from Talend incrementally.
2. Convert svn tags to real git tags. git svn creates branches from svn tags, however, these are real tags.
$ git for-each-ref refs/remotes/tags --shell --format="r=%(refname:short) t=\${r#tags/}" | \
while read e; do eval "$e"; git tag -f $t refs/remotes/$r; git branch -d -r $r; done

3. Upload your git branch to some public place. It is better to have your repository on a public server, just to share / access it from everywhere. is not the right place (even if the new talend products are there), because it has a 300Mb soft limit. Since tos is bigger than 300Mb, no one will able to clone your repository excep who are paying for it. For this reason I suggest to use, it is free and has no quotas.
First, you should upload the trunk branch as master (considering your origin is already set up):
$ git push origin remotes/trunk master

Then you should upload all branches and tags to the remote. Since your branches are under remotes, git push --all will not upload them automatically.
$ for i in .git/svn/refs/remotes/* ;  do  git push origin remotes/`basename $i`:refs/heads/`basename $i` ; done

$ git push origin --tags

Now you are ready and you can do svn rebase anytime. Here you can check, how it will look like: