Migrating projects from SVN repository to Git
Use Talend Studio to export the source code of Jobs from the SVN project and import it to a new Git project in Studio. For more information on how to import and export Job items from Talend Studio, see Talend Studio User Guide.
SVN repository structure:
- <Project1 Technical Name>
- branches
- tags
- trunk
- <Project2 Technical Name>
- branches
- tags
- trunk
Git repository structure:
- <Project1 Technical Name>
- <Project1 Technical Name>
As Git uses its own branches and tags management on all projects while SVN has branches/tags for each project, you will need to set the structure manually.
If you want to work with the same project name, proceed as follows:
- Check out the SVN repository.
- Create a folder for the Git repository and a sub-folder for each project with the technical project name.
- Copy the contents from each SVN trunk folder to the folder in Git.
- Run git init in the Git folder to turn it into a Git repository.
- Run git remote add origin <git-url> to add the remote URL to your local Git repository.
- Run git push to upload all local branches to the remote repository.
- Update projects table in the database. Change the storage URL from SVN to Git.
- Clean the <TomcatPath>/temp folder and restart the tomcat server.
- Update the project setting on the Project page.
- Change the tasks which are from SVN source on the Job conductor page. (Or you can change the executionTask table on multiple records.)
Information noteNote: You may not be able to
migrate all your logs, tags, and branches from SVN to GIT because of the different project
structure.