SCM Manager GIT/SVN Migration #6143

Open
opened 2025-11-02 06:46:18 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @cgsecret on GitHub (Oct 13, 2020).

Hi,

i want to migrate several projects from an old SCM Manager Instance to gitea. Most of them are git based but some of them are using SVN.

Using the integrated migration function for git is an option but is there a way to script it/migrate several (like hundreds) of repos at once?

For the SVN based repos i guess i have to convert them to GIT first. A script to import several gits at once should be helpful here too. Can you guys recommend a way?
I tried a short mini script i can scale later but right now it does not work with gitea.

#!/bin/bash
git clone --bare scmmanager-source || true
git -C reponame.git  for-each-ref --format='%(refname)' 'refs/pull/'  | xargs -l  git update-ref -d || true
git -C reponame.git remote add origin giteaDestination/reponame || true
git -C reponame.git push -u origin master 

Thanks

Originally created by @cgsecret on GitHub (Oct 13, 2020). Hi, i want to migrate several projects from an old SCM Manager Instance to gitea. Most of them are git based but some of them are using SVN. Using the integrated migration function for git is an option but is there a way to script it/migrate several (like hundreds) of repos at once? For the SVN based repos i guess i have to convert them to GIT first. A script to import several gits at once should be helpful here too. Can you guys recommend a way? I tried a short mini script i can scale later but right now it does not work with gitea. ``` #!/bin/bash git clone --bare scmmanager-source || true git -C reponame.git for-each-ref --format='%(refname)' 'refs/pull/' | xargs -l git update-ref -d || true git -C reponame.git remote add origin giteaDestination/reponame || true git -C reponame.git push -u origin master ``` Thanks
GiteaMirror added the type/proposal label 2025-11-02 06:46:18 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6143