Skip to main content

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:
  1. Check out the SVN repository.
  2. Create a folder for the Git repository and a sub-folder for each project with the technical project name.
  3. Copy the contents from each SVN trunk folder to the folder in Git.
  4. Run git init in the Git folder to turn it into a Git repository.
  5. Run git remote add origin <git-url> to add the remote URL to your local Git repository.
  6. Run git push to upload all local branches to the remote repository.
  7. Update projects table in the database. Change the storage URL from SVN to Git.
  8. Clean the <TomcatPath>/temp folder and restart the tomcat server.
  9. Update the project setting on the Project page.
  10. 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!